com.aliyuncs.utils
类 XmlUtils
java.lang.Object
com.aliyuncs.utils.XmlUtils
public final class XmlUtils
- extends Object
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlUtils
public XmlUtils()
getDocument
public static Document getDocument(String payload)
throws ParserConfigurationException,
SAXException,
IOException
- 抛出:
ParserConfigurationException
SAXException
IOException
getDocument
public static Document getDocument(InputSource xml,
InputStream xsd)
throws ParserConfigurationException,
SAXException,
IOException
- 抛出:
ParserConfigurationException
SAXException
IOException
getRootElementFromString
public static Element getRootElementFromString(String payload)
throws ParserConfigurationException,
SAXException,
IOException
- 抛出:
ParserConfigurationException
SAXException
IOException
getChildElements
public static List<Element> getChildElements(Element parent,
String tagName)
getChildElements
public static List<Element> getChildElements(Element parent)
validateXml
public static void validateXml(InputStream xml,
InputStream xsd)
throws SAXException,
IOException,
ParserConfigurationException
- 抛出:
SAXException
IOException
ParserConfigurationException
validateXml
public static void validateXml(Node root,
InputStream xsd)
throws SAXException,
IOException
- 抛出:
SAXException
IOException
Copyright © 2017. All Rights Reserved.