Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Document construirDocumento(File xml) throws FileNotFoundException, IOException, JDOMException {
- SAXBuilder builder = new SAXBuilder();
- FileInputStream fis = new FileInputStream(xml);
- byte[] data = new byte[(int) xml.length()];
- fis.read(data);
- fis.close();
- ByteArrayInputStream bais = new ByteArrayInputStream(new String(data).getBytes("UTF-8"));
- Document docXML = builder.build(bais);
- bais.close();
- return docXML;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement