logo       

Re: cloning nodes vs. creating new() ones: msg#00089

java.enhydra.xmlc

Subject: Re: cloning nodes vs. creating new() ones

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

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise