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 <strong>html</strong>
<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><p>a test</p></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
<p>a test</p>
xn2 relapse <dataitem>a test</dataitem>
i am already checking returned xml (in box xn2) i need un-escape <
etc xn1.
htmldecode does this, nonetheless i'm certain work everything. doubt stays htmldecode hoop illusory entities there category somewhere me.
Comments
Post a Comment