tag:blogger.com,1999:blog-3195885170348729753.post7717383115513088246..comments2023-11-29T17:45:50.424+01:00Comments on Java mon amour: Groovy: parsing XML with namespacesUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-3195885170348729753.post-88753955604711699372015-06-14T01:25:16.745+02:002015-06-14T01:25:16.745+02:00Luciano: good point. Can you please add a working ...Luciano: good point. Can you please add a working example of your idea when adding a node with namespace in it is involved? thanks.Anonymoushttps://www.blogger.com/profile/10519039992971650153noreply@blogger.comtag:blogger.com,1999:blog-3195885170348729753.post-79587305547162526942011-11-08T16:14:42.257+01:002011-11-08T16:14:42.257+01:00You can also initialize XmlSlurper to ignore Names...You can also initialize XmlSlurper to ignore Namespaces: http://groovy.codehaus.org/api/groovy/util/XmlSlurper.html#XmlSlurper(boolean, boolean)<br /><br />new XmlSlurper(false, false)<br /><br />Same goes for XmlParser:<br />http://groovy.codehaus.org/api/groovy/util/XmlParser.html#XmlParser(boolean, boolean)<br /><br />new XmlParser(false, false)<br /><br />In this way you can reference a node without having to declare the namespaces.Lucianohttps://www.blogger.com/profile/14578298426759546130noreply@blogger.com