Hi all,
I have an XML document fed to me from a third party app:
<?xml version="1.0" encoding="WINDOWS-1252" ?>
<GatewayPlan xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Diagnostics>
<ErrorCode>0</ErrorCode>
<ErrorDescription>OK</ErrorDescription>
<Date>11/10/2004</Date>
<Time>12:45 PM</Time>
</Diagnostics>
<GatewayProjectID>5</GatewayProjectID>
<CostCenters>
<CostCenter>1239280000</CostCenter>
<CostCenter>1239320000</CostCenter>
</CostCenters>
<Plan>
<JDEID>1108</JDEID>
<GatewayID>2186</GatewayID>
<Name><![CDATA[1108 Maravilla]]></Name>
<Description><![CDATA[Step into the first floor and take in the spacious
living and dining rooms. Enjoy the gourmet-ready kitchen connected to the
family room on one side and the nook on the other. A den is included
downstairs near the third bath. Go upstairs and enjoy 3 beautiful bedrooms,
2 baths and a tech center.]]></Description>
</Plan>
</GatewayPlan>
I use an XMLTextReader in my app that used to be able to read this type of
data, but the developer of the TPA changed encoding on me and now when I try
to read the CDATA section:
Dim oXmlRdrAs New XmlTextReader(New StringReader(strDocument))
With oXmlRdr
Select Case .Name
Case "Description"
planDesc = .ReadElementString
End Select
....
I receive the following error on "planDesc = .ReadElementString"
ex.Message = "'EndElement' is an invalid node type. Line 1, position 843."
Any ideas on why my app would suddenly not be able to read this?
TIA
-Rich