16 May 15:11
[groovy-user] XML processing with Groovy's different APIs
From: Jean-Noël Rivasseau <elvanor@...>
Subject: [groovy-user] XML processing with Groovy's different APIs
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-05-16 13:14:34 GMT
Subject: [groovy-user] XML processing with Groovy's different APIs
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-05-16 13:14:34 GMT
Hello all,
since yesterday I've been playing with the various APIs for reading /
writing XML in Groovy. A couple of remarks and a question:
* the differences between the default settings in the different APIs
are not documented. For example (I may be wrong), my own experience
has been that while XmlParser is namespace aware by default,
XmlSlurper is not (why?)
* XmlSlurper does not support the notions of text nodes, right? For example
<div> hello, <span> this is some text</span> that ends here. </div>
Using XmlSlurper, on the div element there seems to be only one child
node. If I use the DOMBuilder (DOMCategory), I get all three nodes (2
text nodes and one normal node).
My question is : is it possible to do schema validation (not DTD)
directly in DOMBuilder, XmlParser or XmlSlurper? According to the
docs, it seems that validation with these objects works only with a
DTD. I am using a schema, I tried to use validation but it failed.
Does that mean I have to turn validation off and use the method
described (involving creating a validator object)?
Jean-Noel
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
RSS Feed