public static Document parseXmlFile(File pomFile) throws IOException { XMLParser parser = new XMLParser(); return parser.parse(pomFile); }
public static Document parseXmlFile(File pomFile) throws IOException { XMLParser parser = new XMLParser(); return parser.parse(pomFile); }
/** Convenience method to parse a file into XML. * @throws IOException */ public static Document parse (File file) throws IOException { XMLIOSource source = new XMLIOSource (file); XMLParser parser = new XMLParser (); return parser.parse (source); } }
/** Convenience method to parse a String into XML. * * <p>In this case, the encoding is ignored; the string already has to * be Unicode. After the parsing, you will still find the encoding from * the XML declaration in the Document (if there was one). */ public static Document parse (String xml) { return new XMLParser ().parse (new XMLStringSource (xml)); }
public void merge(InputStream in) throws IOException { merge(new XMLParser().parse(new XMLIOSource(in))); }
public void merge(Reader r) throws IOException { merge(new XMLParser().parse(new XMLIOSource(r))); }
/** * Parses the generic artifact information of a feature. * * @param in The input stream of the feature.xml * @return The generic description * @throws IOException If a parser error occurred */ private static GenericP2Artifact parseFeature(InputStream in) throws IOException { // no closing of input stream required - our caller will close the jar // at the end final Feature f = new Feature(new XMLParser().parse(new XMLIOSource(in))); return new GenericP2Artifact(f.getId(), f.getVersion(), P2ArtifactType.FEATURE); }
public JdkReleases parse(InputStream in) throws IOException { Document doc = new XMLParser().parse(new XMLIOSource(in)); JdkReleases.Builder builder = JdkReleases.newBuilder(); parseDoc(doc, builder); return builder.build(); }