Can anybody help?? I keep getting an "Invlaid at the top level of the document." error
Code:
. When I'm trying to read an xml file.
XML:
<?xml version='1.0'?><RecordSet>
<Record><Header_ID>1</Header_ID><Header_Ref>AAAAA</Header_Ref><Header_Low>jasljflaksjflkas</Header_Low><Header_High>asfasfasf</Header_High></Record></RecordSet>
VB:
Dim xmlDoc As MSXML2.DOMDocument26
Dim xmlNode As MSXML2.IXMLDOMNode
'Create and load the xml document
Set xmlDoc = New MSXML2.DOMDocument26
With xmlDoc
.async = False
.loadXML (strXMLWebLocation & "upload_q_headers.xml")
End With
'Check for a parse error in the xml
If Not xmlDoc.parseError.reason = "" Then
'Is xml error
MsgBox xmlDoc.parseError.errorCode & " : " & xmlDoc.parseError.reason
Else
'No xml error
'Read xml
...
I'm quite new xml with vb so I might be something really idiotic!!
Please help
Rob