public class XmlUtils extends Object
| Constructor and Description |
|---|
XmlUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
documentToPrettyString(org.dom4j.Document document)
Returns the given document as a XML string in a "pretty" format.
|
static List<org.dom4j.Node> |
selectNodes(org.dom4j.Node node,
String xpathQuery,
Map<String,String> namespaceUris)
Executes the specified namespace aware XPath query as a multiple node query, returning the resulting list of nodes.
|
static List<String> |
selectNodeValues(org.dom4j.Node node,
String xpathQuery)
Executes the specified XPath query as a multiple node query, returning the text values of the resulting list of
nodes.
|
static List<String> |
selectNodeValues(org.dom4j.Node node,
String xpathQuery,
Map<String,String> namespaceUris)
Executes the specified namespace aware XPath query as a multiple node query,
returning the text values of the resulting list of
nodes.
|
static Object |
selectObject(org.dom4j.Node node,
String xpathQuery)
Executes an XPath query to retrieve an object.
|
static org.dom4j.Node |
selectSingleNode(org.dom4j.Node node,
String xpathQuery,
Map<String,String> namespaceUris)
Executes the specified namespace aware XPath query as a single node query, returning the resulting single node.
|
static String |
selectSingleNodeValue(org.dom4j.Node node,
String xpathQuery)
Executes the specified XPath query as a single node query, returning the text value of the resulting single node.
|
static String |
selectSingleNodeValue(org.dom4j.Node node,
String xpathQuery,
Map<String,String> namespaceUris)
Executes the specified namespace aware XPath query as a single node query,
returning the text value of the resulting single node.
|
public static Object selectObject(org.dom4j.Node node, String xpathQuery)
public static String selectSingleNodeValue(org.dom4j.Node node, String xpathQuery)
public static String selectSingleNodeValue(org.dom4j.Node node, String xpathQuery, Map<String,String> namespaceUris)
public static List<String> selectNodeValues(org.dom4j.Node node, String xpathQuery)
public static List<String> selectNodeValues(org.dom4j.Node node, String xpathQuery, Map<String,String> namespaceUris)
public static org.dom4j.Node selectSingleNode(org.dom4j.Node node,
String xpathQuery,
Map<String,String> namespaceUris)
public static List<org.dom4j.Node> selectNodes(org.dom4j.Node node, String xpathQuery, Map<String,String> namespaceUris)
public static String documentToPrettyString(org.dom4j.Document document)
document - Copyright © 2018 CrafterCMS. All rights reserved.