Click here to Skip to main content
15,743,934 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone, I am not well versed in xml and am having a problem. I want to display an xml file in a form, but not the first few lines. Here is the xml:

XML
<pre lang="xml"><?xml version="1.0"?>
<!--This is a host terminal response-->
<RESPONSE xmlns="x-schema:C:\fp\swdir\Content\emulation-schema.xmlK">
  <LINE INDEX="1"><![CDATA[VJ5L6E/SF QSBSB DBAYSF  AG 49837045 26NOV]]><CARRIAGE_RETURN/></LINE>
  <LINE INDEX="2"><![CDATA[ 1.1FOSTER/SCOTT ]]><CARRIAGE_RETURN/></LINE>



All I'm looking to do is eliminate everything but the portions after the CDATA tags.

Here is what I've tried along with dozens of attempsts:

SQL
doc.LoadXml(strResp)


        For Each node As XmlNode In nodeList
            'TextBox1.Text = TextBox1.Text & node.SelectSingleNode("RESPONSE").InnerText
            TextBox1.Text = TextBox1.Text & node.SelectSingleNode("RESPONSE xmlns").InnerText
        Next node



Any help would be greatly appreciated. Thanks.
John
Posted
Comments
DamithSL 1-Dec-14 22:13pm    
what is the expected output xml?

1 solution

I'm not sure what exactly you expected as output xml, check below links for different ways you can try
Using Linq to XML[^]
processing XML with a XSLT[^]
Using regex[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900