com.aliyuncs.utils
类 XmlUtils

java.lang.Object
  继承者 com.aliyuncs.utils.XmlUtils

public final class XmlUtils
extends Object


构造方法摘要
XmlUtils()
           
 
方法摘要
static List<Element> getChildElements(Element parent)
           
static List<Element> getChildElements(Element parent, String tagName)
           
static Document getDocument(InputSource xml, InputStream xsd)
           
static Document getDocument(String payload)
           
static Element getRootElementFromString(String payload)
           
static void validateXml(InputStream xml, InputStream xsd)
           
static void validateXml(Node root, InputStream xsd)
           
 
从类 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.