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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] html file as a xml contents

[ Lists Home | Date Index | Thread Index ]


xml packets? is that some new entity from the MS factory?

well do you want to send the content as text, with escaped <, > etc, or as
markup? if you choose the latter then the content has to be well-formed
xml. I believe you can use w3c Tidy to make sure the html is well-formed.
otherwise, either process the content to escape all characters that need
escaping (typically '<' and '&', and why not '>' too) or put the whole
text in as CDATA.
like so:
  <contents><![CDATA[All the contents of the badly marked-up html file]]></contents>

escaping is done by replacing reserved characters with character entity
references, for example replace '<' with '&lt;'

regards,

/m

Martin Klang
http://www.o-xml.org - the object-oriented XML programming language

On Sun, 10 Apr 2005, asim wrote:

> Hi List
>   i m trying to read a .html file using ASP and send the contents of this html as contents of a xml packet ....
> for example
> <data>
>     <contents>All the contents of html file</contents>
> </data>
>
> i know that it is giving me error due to "<",">" and "&" characters like this
>
> is there any way to pass them preserved
>
> Qazi Asim





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS