NotesDOMParser.Process method and "Unable to recognize or load XML reformatter input character set" error

I receive this error:“Unable to recognize or load XML reformatter input character set”

when using the NotesDOMParser.Process method.

Here is the code snippet:

Set oHTTP = CreateObject(“Microsoft.XMLHTTP”)

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

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

oHTTP.send("")

returnText = oHTTP.responseText

Set oHTTP = Nothing 



Set xmlstream = s.CreateStream

xmlstream.WriteText(returnText)

Set parser = s.CreateDOMParser(xmlstream)

Call parser.Process

It errors at the Call parser.Process line.

I found a this post:

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

My XML doc/return text contains whitespace in some of the nodes - could this be causing the problem?

Do I have to format the XML text before I parse?

Thanks!

Dan

Subject: Your NotesStream is Empty

The NotesStream.WriteText will write whatever is in the stream. Your stream is empty. You need to do a NotesStream.ReadText or Read to load the stream, and then pass it to a DOMParser.