Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parser Error Number

Status
Not open for further replies.

rhull

Programmer
May 23, 2001
46
US
I used this EXACT code before and it worked fine but when I use it again for a detailed search I keep getting a Parsing Error of -1072898035. How can I found out what this error means?

Any ideas on what is going on?
Thanks



<%

Sub GetDetails()
'Display Names w/ links
set objXMLDetails = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)
set objListDetails = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)
objXMLDetails.async = False


strURLDetails = &quot;
objXMLDetails.Load(strURLDetails)

'Error occured
If objXMLDetails.parseError.errorCode<>0 Then
Response.Write (objXMLDetails.parseError.errorCode)
Exit Sub
End IF



Set objXMLDetails = Nothing
Set objListDetails = Nothing
End Sub

%>
 
Also ask:

objXMLDetails.parseError.reason
objXMLDetails.parseError.line
objXMLDetails.parseError.linepos

to get a more detailed errorreport.

Good luck!

Jordi Reineman
 
thanks!
I found out that the code referred to a DTD(which I CANNOT MODIFY), and it says

&quot;The element 'partytype' is used but not declared in the DTD/Schema&quot;

I looked at the schema (
<!ELEMENT parties (party+)>
<!ELEMENT party (partytype, seq, namefirst, namemiddle, namelast, namesuffix, race, sex)>

So am I not using a correct parser for this or is the DTD not set up right?
-Ryan
 
You said you've used this code before and it worked. Did you change the DTD afterwards or did you change the xml? Remember that XML is case sensitive, so perhaps the element in your xml is called 'Partytype' and in your schema 'partytype'??

Good luck!

Jordi Reineman
 
Yeah my code is fine, I just noticed that the DTD had problems all over it.The first XML doc didnt refer to a DTD, but the second one does.

Partytype wasn't defined properly. They forgot
<!ELEMENT partytype(#PCDATA)>
(and other issues too)


Since the XML doc refers to the DTD I cant do much until they fix the problem. (I just pull the XML data from another companies server using xmlHTTP) But I thought I could say obj.validateOnParse= &quot;false&quot; but then it doesn't load the documunt correctly. Can I just override the whole DTD so it isn't used?

Hey thanks again for the tips.
-Ryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top