Last active
August 29, 2015 14:08
-
-
Save jresendiz27/5d69052dbbbff0e0df86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def xmlContent = new File("your-sat-xml-file.xml").getText() | |
def xml = new XmlSlurper().parseText(xmlContent).declareNamespace( | |
cfdi:"http://www.sat.gob.mx/cfd/3", | |
xsi:"http://www.w3.org/2001/XMLSchema-instance")}} | |
//Getting xml information. | |
//this will work for other xml files with other namespaces if needed | |
//@ for reading xml attributes, if there's no attribute just . operator will be fine | |
println xml.'cfdi:Receptor'.@rfc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment