Created
October 25, 2020 19:01
-
-
Save HashRaygoza/76c5d1ae9d4bc3f808b6a99a1720d558 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
// XPath nos permite seleccionar objetos via su ubicacion en la estructura del XML | |
XPath xPath = XPathFactory.newInstance().newXPath(); | |
// La ruta del elemento que deseamos, para este omitir el prefijo cfdi: | |
String expresionTranslados = "/Comprobante/Impuestos/Traslados/Traslado"; | |
// Obtenemos todos los nodos que empatan con la ruta que indicamos | |
NodeList nodeListTranslados = (NodeList) xPath.compile(expresionTranslados).evaluate(documento, XPathConstants.NODESET); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment