Utnapishtim
IS-IT--Management
I am trying to parse an XML file using VB.Net using the XMLValidatingReader method. The XML file contains a soap header, followed by several document iterations. The structure follows:
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP:Envelope xmlns="http:...">
<Soap:Header>
</SOAP:Header>
<Soap:Body>
</Soap:Body>
</SOAP:Envelope>
<?xml version="1.0" encoding="UTF-8" ?>
<RecordData documentcount="2" xlmns="...">
.
.
.
</RecordData>
<?xml version="1.0" encoding="UTF-8" ?>
<RecordData documentcount="2" xlmns="...">>
.
.
.
</RecordData>
The significant error indicates that there is an unexpected XML declaration. I am assuming that the problem lies in the fact that multiple iterations of the <?xml declaration exist. How can I treat each of the documents within the xml declaration as separate entities to be parsed?
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP:Envelope xmlns="http:...">
<Soap:Header>
</SOAP:Header>
<Soap:Body>
</Soap:Body>
</SOAP:Envelope>
<?xml version="1.0" encoding="UTF-8" ?>
<RecordData documentcount="2" xlmns="...">
.
.
.
</RecordData>
<?xml version="1.0" encoding="UTF-8" ?>
<RecordData documentcount="2" xlmns="...">>
.
.
.
</RecordData>
The significant error indicates that there is an unexpected XML declaration. I am assuming that the problem lies in the fact that multiple iterations of the <?xml declaration exist. How can I treat each of the documents within the xml declaration as separate entities to be parsed?