Re: import html in a document
Jacob Kjome <[email protected]> Mon, 22 Sep 2003 10:51:02 -0500
| Newsgroups | gmane.comp.java.enhydra.xmlc |
|---|---|
| Message-ID | <[email protected]> |
You are close, but you need to remember that nodes from two different documents don't know about each other until you import them into the current document you are working on. Try this... aHTML.getElementContentTarget().appendChild(aHTML.importNode(bHTML.getElementContentSource(), true)); I'm pretty sure you can do all that in one line, but you'll have to try it out to make sure. Jake At 01:40 PM 9/22/2003 +0200, you wrote: >Hi, > >I have one question. Let's say there are two HTML files: > >a.html >---------- > >b.html >----------- > >text > >Is it possible to include the whole content from the div tag with the id >"contentSorce" in b.html into the div tag with the id "contentTarget" in >a.html? >I tried >aHTML.getElementContentTarget().appendChild(bHTML.getElementContentSource()) >but it doesn't work. > >Thanks >Thorsten > > > >_______________________________________________ >XMLC mailing list >[email protected] >http://www.enhydra.org/mailman/listinfo.cgi/xmlc