richmon
12 years agoOccasional Contributor
Looking for Strategies for Getting Attribute Data From CDATA
I get a response like this:
However, I've tried doing the double/triple property transfer but I get null values as there is no data between the elements. All of the data is stored in the attributes of a single element. This article doesn't handle these results.
I have also attempted to do a simple "Contains" check and creating some MSSQL that formats the string - but the root of the problem remains that the CDATA is an empty string and the real data is in the attributes. (Sloppy I know - but it is what I have to work with).
Please advise.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<LoadCompressedDeletedVehiclesResponse xmlns="http://tempuri.org/rpc/Gateway">
<LoadCompressedDeletedVehiclesResult>
<CompressedVehicles><![CDATA[<F
_0="vehicleid"
_1="vin"
_2="dateremoved">
<RS>
<R
_ID="zzz9876543210">
<VS>
<V
_0="501105711"
_1="1B3CB4HA4AD534674"
_2="5/30/2012 8:07:56 AM" />
<V
_0="501105711"
_1="1B3CB4HA4AD534674"
_2="9/18/2012 9:34:08 AM" />
<V
_0="501105712"
_1="1B3CC5FB7AN189889"
_2="8/24/2012 12:46:12 PM" />
</VS>
</R>
</RS>
</F>]]></CompressedVehicles>
<ErrorMessage/>
<InventoryResultType>OK</InventoryResultType>
<IsSuccess>true</IsSuccess>
</LoadCompressedDeletedVehiclesResult>
</LoadCompressedDeletedVehiclesResponse>
</soap:Body>
</soap:Envelope>
However, I've tried doing the double/triple property transfer but I get null values as there is no data between the elements. All of the data is stored in the attributes of a single element. This article doesn't handle these results.
I have also attempted to do a simple "Contains" check and creating some MSSQL that formats the string - but the root of the problem remains that the CDATA is an empty string and the real data is in the attributes. (Sloppy I know - but it is what I have to work with).
Please advise.