public class XmlUtils extends Object
Modifier and Type | Method and Description |
---|---|
static HashMap<String,Element> |
buildIndex(Element element,
String tagName,
String idName) |
static HashMap<String,Element> |
createIndex(Element root,
String tagName,
String idName) |
static void |
main(String[] args) |
static Document |
newDocument() |
static Document |
newDocument(boolean isNamespaceAware) |
static Document |
openXmlFile(File file) |
static Document |
openXmlFile(File file,
File schemaFile,
boolean isNamespaceAware,
boolean isXIncludeAware) |
static Document |
openXmlFile(File file,
Schema schema,
boolean isNamespaceAware,
boolean isXIncludeAware) |
static Document |
openXmlReader(Reader reader,
Schema schema,
boolean isNamespaceAware,
boolean isXIncludeAware) |
static Document |
openXmlStream(InputStream stream,
Schema schema,
boolean isNamespaceAware,
boolean isXIncludeAware) |
static void |
printDOM(File file,
Document doc) |
static void |
printDOM(File file,
Document doc,
String encoding) |
static void |
printDOM(OutputStream ostr,
Document doc,
String encoding) |
public static Document openXmlFile(File file, Schema schema, boolean isNamespaceAware, boolean isXIncludeAware) throws IOException, SAXParseException, SAXException
IOException
SAXParseException
SAXException
public static Document openXmlFile(File file, File schemaFile, boolean isNamespaceAware, boolean isXIncludeAware) throws IOException, SAXParseException, SAXException
IOException
SAXParseException
SAXException
public static Document openXmlFile(File file) throws IOException, SAXParseException, SAXException
IOException
SAXParseException
SAXException
public static Document openXmlReader(Reader reader, Schema schema, boolean isNamespaceAware, boolean isXIncludeAware) throws IOException, SAXParseException, SAXException
IOException
SAXParseException
SAXException
public static Document openXmlStream(InputStream stream, Schema schema, boolean isNamespaceAware, boolean isXIncludeAware) throws IOException, SAXParseException, SAXException
IOException
SAXParseException
SAXException
public static Document newDocument(boolean isNamespaceAware)
public static Document newDocument()
public static HashMap<String,Element> createIndex(Element root, String tagName, String idName)
public static void printDOM(OutputStream ostr, Document doc, String encoding)
public static void printDOM(File file, Document doc, String encoding) throws FileNotFoundException
FileNotFoundException
public static void printDOM(File file, Document doc) throws FileNotFoundException
FileNotFoundException
public static HashMap<String,Element> buildIndex(Element element, String tagName, String idName)
public static void main(String[] args)
Copyright © 2016. All rights reserved.