OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: help needed



> From: Jerry Johns [mailto:Jjohns@computerlogic.com]
> Sent: Friday, January 05, 2001 2:06 PM
> To: 'xml-dev@lists.xml.org'
> Subject: help needed
>
>
> I'm using the DOM API to create an XML file. I need to imbed an HTML
> document within the XML document. I also need to imbed a JPEG binary file
> into the XML documented.
>
> When I use the DOM API to place content into the XML file, DOM is
> translating special characters "<" and ">" into text strings, such as
> "&lt;".
>
> Do you know of a way to instruct DOM to not do this conversion when it
> places content into the XML document?

Then it wouldn't be a well-formed XML document.

Either you insert the HTML as character data (in which case you'll have to
live with the escaping), or use XHMTL instead, parse into the DOM, and
insert the sub tree. Then the HTML will be handled just like any kind of
XML.