public final class XmlUtils extends Object
| 构造器和说明 |
|---|
XmlUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
getTextForElement(String xmlAsString,
String element)
Retrieve the text for a specific element (when we know there is only
one).
|
static List<String> |
getTextForElements(String xmlAsString,
String element)
Retrieve the text for a group of elements.
|
static XMLReader |
getXmlReader()
Get an instance of an XML reader from the XMLReaderFactory.
|
static Document |
newDocument(String xml)
Creates a new namespace-aware DOM document object by parsing the given XML.
|
public static Document newDocument(String xml)
xml - XML content.public static XMLReader getXmlReader()
public static List<String> getTextForElements(String xmlAsString, String element)
This method is currently optimized for the use case of two elements in a list.
xmlAsString - the xml responseelement - the element to look forCopyright © 2023. All rights reserved.