NotesDOMParser and XMLPlatformException when parsing XML

I have some code that is parsing XML using the NotesDOMParser class.

Here is how I get the returned XML:

Set oHTTP = CreateObject("Microsoft.XMLHTTP")

oHTTP.open "GET", urlToUse, False, "", ""

oHTTP.setRequestHeader "Content-type", "application/x-www-form-urlencoded"

oHTTP.send("")

returnText = Trim$(oHTTP.responseText)

Set oHTTP = Nothing

Here is a sample of the XML that is returned:

<?xml version="1.0" encoding="UTF-8"?>

After I get the XML, I attempt to parse. Here is the code:

Set xmlstream = s.CreateStream

Call xmlstream.ReadText()

Call xmlstream.WriteText(returnText)

Set parser = s.CreateDOMParser(xmlstream)

Call parser.Process

Set docNode = parser.Document

When I hit the “Call parser.Process,” I receive this error:

<?xml version='1.0'?>

An exception occurred! Type:XMLPlatformException, Message:Could not open file: PricerRetrieveResponse.xsd

Fatal error encountered during schema scan

DOM parser operation failed

I found this post:

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/1f2eb86a615807e685256fdd00022c63?OpenDocument

Should the PricerRetrieveResponse.xsd file be copied to a local hard drive?

Could I remove the tag so this error does not appear again?

Is there a better method than NotesDOMParser to use to parse this XML?

Any help would be great!

Thanks!

Dan

Subject: RE: NotesDOMParser and XMLPlatformException when parsing XML

Validation is optional – you could turn it off.

I’m a little curious that your xsd location is “http://acme.com/SRServices/Pricer/PricerRetrieveResponse.xsd PricerRetrieveResponse.xsd” with a space in it. Are you sure this is the correct location?

Subject: RE: NotesDOMParser and XMLPlatformException when parsing XML

Andre,

Thanks for the response!

I am still at the beginner level with calling a servlet to return XML, so please bear with me on my questions…

As for the location – that is what the developer is sending/creation for me to access. Should it be on another location? Or what should the location look like?

As for the validation – how would I turn that off? I am not familiar with that…

Thanks again!

Dan

Subject: RE: NotesDOMParser and XMLPlatformException when parsing XML

Please read the documentation of the classes you’re using. It’s simply amazing how much that helps.