...
We can parse this document with validation turned on using the following code XmlParser as follows:
| Code Block |
|---|
def validating = true def namespaceAware = false new XmlParser(validating, namespaceAware).parseText(xml) |
Or using the XmlSlurper as follows:
| Code Block |
|---|
new XmlParser(validating, namespaceAware).parseText(xml)
|