Thanks pchew, that does work. The sequence of calls should be as follows:
pub.xml:xmlStringToXMLNode
pub.xml:xmlNodeToDocument
pub.schema:validate
…
So, if the XML is invalid the call pub.xml:xmlNodeToDocument will fail.
Here is my problem:
- I have implemented a publish-subscribe model for sending a specific XML info from source 1 to Targets 1, 2 and 3.
- Targets 1 and 2 would need the XML info in different format than the source, so no problem there. I will transform and send it.
- However, Target 3 needs the XML in the same format as the source, but I need to supress the invalid XMLs.
If I have to convert the same document back to an XML, the structure of the XML is changing because of the way wM generates the document structure for a ‘group’ element.
Any ideas how I can validate the XML string without having to convert to document ? Is it supported in version 8.2 (I am using version 8.0.1) ?
#webMethods#Flow-and-Java-services#Integration-Server-and-ESB