471,355 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,355 software developers and data experts.

XML err: there is invalid data at the root level, line 1,position

Hi all

desperately need help .
2 months and however many attempts and posts , and still no closer to a

I am trying to retrieve a XML (with DTD) doc from a cgi which I access with
a webrequest.
I can get the XML if I paste the webrequest url into the address of my IE
6.0 browser.
but using xml reader validating reader, xmldoc even a straight textreader ,
no joy.

result = req.GetResponse()
ReceiveStream = result.GetResponseStream()
encode = System.Text.Encoding.GetEncoding("utf-8")
sr = New StreamReader(ReceiveStream, encode)

Dim tr As New XmlTextReader(sr)
tr.Normalization = False
Dim vr As XmlValidatingReader = New XmlValidatingReader(tr)
vr.ValidationType = ValidationType.DTD

AddHandler vr.ValidationEventHandler, AddressOf
While (vr.Read())
Select Case vr.NodeType
Case XmlNodeType.Element
Neal Rogers
University of Cape Town
Jul 21 '05 #1
0 1020

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by XML newbie: Urgent pls help! | last post: by
2 posts views Thread by =?Utf-8?B?am1ncm8=?= | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.