Re: cloning nodes vs. creating new() ones
Jacob Kjome <[email protected]> Tue, 16 Sep 2003 13:34:01 -0500
| Newsgroups | gmane.comp.java.enhydra.xmlc |
|---|---|
| Message-ID | <[email protected]> |
At 10:59 AM 9/16/2003 -0700, you wrote:
>>Use the span tag.
>>
>><option id="teacherOption"><span id="teacherName">Mrs.
>>Wormwood</span></option>
>>
>>Then it will be as easy as page.setTextTeacherName("new name");
>
>I tried that, but xmlc parses it out of my page saying that <span> was an
>unexpected tag. At any rate, it works by doing
>page.setTextTeacherOption("name");
You should double check the html spec to see if <option> allows nested
inline tags. It might not and you'd have to abide by that limitation. If
it does, though, then that would be a bug in JTidy. However, JTidy may
very well be doing the right thing here.
Don't forget about the option of using XMLCUtil.findFirstText(Node) to get
access to the text node regardless of nested tag structure. the
setTextTeacherOption(String) is probably still your best option, though.
Jake