Results 1 to 10 of 10
Thread: xml parse errors
Aug 18, 2005, 06:30 #1
xml parse errors
I'm retrieving an XML document posted to my page using 3 simple lines
set xmldoc = Server.CreateObject("Microsoft.XMLDOM") xmldoc.async=false xmldoc.load(Request)
Also is there anyway I can view the raw results in "request"?Don't you just hate it when it works first time.
Aug 18, 2005, 06:38 #2
where are you getting request from?
I am taking it that this is not the request object since that would be silly.
Aug 18, 2005, 06:43 #3
from what I can gather load(request) is the "reserved word" for pulling details out of a post header.
the origin of the xml posted is unknown, the script simply waits for a remote page to call it -> runs through it's process -> outputs results... in this case a simple "ok got it"Don't you just hate it when it works first time.
Aug 18, 2005, 07:30 #4
You've got to say what you want to pull out of the request object.
You've your XML object which is expecting the location of your XML file, but your passing it the request object
try something more like:
xmldoc.loadXML( request("myXMLField") )
Aug 18, 2005, 07:46 #5
what you're saying makes sense but there's a big but.
I have no idea what's in the XML document to start with, it's a document which can change and most likely will. I have no control what-so-ever what goes into it. My system needs to be fluid enough to accept changing structures and store them.
At this stage all I'm bothered about is storing the exact XML doc as it comes.
Also loadXML causes errors because it only accepts string formats, the information coming through is XML. So a nice little type mismatch error flashes up. To me that doesn't make much sense because I thought all XML could be read as text hence a string but it's in almost everything I've read up to now.Don't you just hate it when it works first time.
Aug 18, 2005, 07:58 #6
XML is only a string that follows pre-defined formatting rules. The code I gave you doesn't really care about what the XML is (provided it's valid), it just needs to know the POST or QueryString variable name it's sent to the webserver in.
Aug 18, 2005, 08:05 #7
see what your saying thanks for explaining
my problem is I've no idea what that variable would be called. sources I've been through have all said use xmldoc.load(request) to pull anything out of the headers. from that I assume it pulls out whatevers there.
in some test cases this did work, only time it seems to fail is when a doctype is defined and dtd supplied, no idea why that would stop anything from working.Don't you just hate it when it works first time.
Aug 18, 2005, 08:08 #8Code:
For Each item in request.form response.write item Next For Each item in request.querystring response.write item Next
Aug 18, 2005, 08:36 #9
if this is that simple i'm gonna be black and blue before the day is through!
testingDon't you just hate it when it works first time.
Aug 18, 2005, 08:47 #10
wasn't as simple as that... didn't workDon't you just hate it when it works first time.