how i un-escape xml entities simply .net


i have formula advantage innerxml xmlnode.



the node enclose only calm (with html) xml.



for example:



<xmlnode>
here &lt;strong&gt;html&lt;/strong&gt;
<xmlnode>


or



<xmlnode>
<xmlcontent>here content</xmlcontnet>
</xmlnode>


if i innerxml <xmlnode> html tags returned xml entities.



i can't innertext since i need means xml contents. i unequivocally need proceed un-escape html tags, since i detect it's xml act accordingly.



i speculation i htmldecode, nonetheless decode xml encoded entities?



update: i speculation i'm careless bit above here simplified scenario:



i have xml request looks this:



<content id="1">
<data>&lt;p&gt;a test&lt;/p&gt;</data>
</content id="2">
<content>
<data>
<dataitem>a test</dataitem>
</data>
</content>


if i do:



xmlnode xn1 = document.selectsinglenode("/content[@id=1]/data");
xmlnode xn2 = document.selectsinglenode("/content[@id=2]/data");

console.writeline(xn1.innerxml);
console.writeline(xn2.innerxml);


xn1 relapse



 &lt;p&gt;a test&lt;/p&gt;


xn2 relapse <dataitem>a test</dataitem>



i am already checking returned xml (in box xn2) i need un-escape &lt; etc xn1.



htmldecode does this, nonetheless i'm certain work everything. doubt stays htmldecode hoop illusory entities there category somewhere me.



Comments

Popular posts from this blog

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?

grails record upload problems

how i emanate permitted url asp.net mvc?