Re: import html in a document

Jeremy Ferry <[email protected]> Mon, 22 Sep 2003 11:31:02 -0500
Newsgroups gmane.comp.java.enhydra.xmlc
Message-ID <[email protected]>
This question comes up frequently. Looks like you need to import the node into 
your current document. Try something like...

aHTML.getElementContentTarget().appendChild( aHTML.importNode( 
bHTML.getElementContentSource(), true ) )


Here are some references to similar stuff on the list...

http://enhydra.enhydra.org/project/mailingLists/enhydra/200006/msg00629.html
http://enhydra.enhydra.org/project/mailingLists/enhydra/200012/msg00236.html
http://enhydra.enhydra.org/project/mailingLists/enhydra/200110/msg00073.html

Jeremy

On Monday 22 September 2003 06:40 am, Thorsten Möller wrote:
> Hi,
>
> I have one question. Let's say there are two HTML files:
>
> a.html
> ----------
> <html>
> <head>
> <title>blah</title>
> </head>
> <body>
> <div id="contentTarget"><div>
> </body>
> </html>
>
> b.html
> -----------
> <html>
> <head>
> <title>blah</title>
> </head>
> <body>
> <div id="contentSorce"><p>text</p><!-- and any other tags --><div>
> </body>
> </html>
>
> 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