Created
February 18, 2021 06:16
-
-
Save HashRaygoza/3aaf0e2313afdf6e08e94dc247b92588 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| package mx.hash.xml2json; | |
| import java.io.IOException; | |
| import java.util.logging.Level; | |
| import java.util.logging.Logger; | |
| import javax.xml.parsers.ParserConfigurationException; | |
| import javax.xml.transform.TransformerException; | |
| import org.xml.sax.SAXException; | |
| public class App { | |
| static public void main(String[] args) { | |
| try { | |
| // Ruta del archivo XML | |
| String nombreArchivo = "A-2.xml"; | |
| ConversorJSON conversor = new ConversorJSON(); | |
| String json = conversor.convertir(nombreArchivo); | |
| System.out.println(json); | |
| } catch (ParserConfigurationException | SAXException | IOException | TransformerException ex) { | |
| Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment