Thread View: borland.public.delphi.xml
1 messages
1 total messages
Started by Anders Gustavsson
Fri, 16 May 2008 19:30
Validating a SOAP subnode
Author: Anders Gustavsson
Date: Fri, 16 May 2008 19:30
Date: Fri, 16 May 2008 19:30
35 lines
2048 bytes
2048 bytes
I got most pieces together in my little SOAP validation project now.
But there is still a XML problem I can't figure out:
1. The SOAP XML I am trying to validate (in simplified form) looks like
this:
<SOAP-ENV:Envelope xmlns:SOAP-ENV= bla bla>
<SOAP-ENV:Body>
<ErrorResponse xmlns=bla bla>
<error>
<error-code>1</error-code>
<error-text>An error</error-text>
</error>
</ErrorResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
2. The validation function needs an IXMLDOMDocument and an
IXMLDOMSchemaCollection. I load the SOAP message into the
IXMLDOMDocument, and the XSD files inteo the IXMLDOMSchemaCollection,
and, when I call validate, it says: "Validate failed because the root
element had no associated DTD/schema."
3. Fair enough, the Envelope and Body parts need not be there. Removing
them, just leaving the ErrorResponse node fixes everything: validating
works fine!
4. Now to my problem: I want to do this the *real* way, not by fixing
the XML string. So I load it into a TXMLDocument and tries to find the
node by iterating. But then I get a IXMLNode back, not a
IXMLDocumentNode.
Me thinks this should be simple. Could someone help me?
/Anders
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads