Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-3
-
None
-
None
Description
currently, gpath expressions support xml namespaces, as fixed in issue GROOVY-953. however, as xml namespaces are usually long urls, using namespaces in gpath expressions become an impraticable task. example:
given the following xml:
<bar xmlns:x="http://a.very.long.namespace.goes.here">
<x:node x:test="foo" />
</bar>
to get the value "foo", we need to build the following gpath expression (assume "xml" as a representative of the "bar" node):
xml."http://a.very.long.namespace.goes.here:node"["http://a.very.long.namespace.goes.here:test"]
but if namespace aliases were enabled, it should be possible to select the same value with the following gpath expression:
xml."x:node"["x:test"]
is it possible to implement? i think this way it would be easier to parse complex xml documents with groovy
thanks!
Attachments
Issue Links
- relates to
-
GROOVY-1040 support namespaced (QName) based navigations in the Node XML model.
- Closed