top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

WindowsPhone xml parsing : Embedding html content inside of xml document c#:

+1 vote
327 views
WindowsPhone xml parsing : Embedding html content inside of xml document c#:
posted Mar 26, 2015 by Sathish Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

In general xml-parser can try to parse all elements in the xml document.But its failure when we try to kept html content inside of xml doc's.like this

<xml>

<mydata><html><h1>SubramanyamRaju</h1></html></mydata>

</xml>

Because Html content tag includes ('<' &'/>') which treated as xml element and at this case xml parser is failed to parse.

To solve this we need to kept html content inside of CDATA like this

<![CDATA[..html content..]]>

Example:

<xml>
<mydata><![CDATA[<html><h1>SubramanyamRaju</h1></html>]]></mydata>
</xml>

CDATA:

Text inside a CDATA section will be ignored by the parser.

answer Mar 30, 2015 by Jdk
...