public class XMLParsing extends Object
Modifier and Type | Class and Description |
---|---|
static class |
XMLParsing.ElementVisitor
Iterator class
|
Constructor and Description |
---|
XMLParsing() |
Modifier and Type | Method and Description |
---|---|
static XMLNode |
convert(Node n) |
static XMLNode |
findChildElement(XMLNode elem,
String tag)
Returns an child element with the current tag name or null.
|
static XMLNode |
findElementPath(XMLNode elem,
String path)
Parses a path string of the form
|
static String |
getElementContent(XMLNode root,
String path)
Like getElementContents(...) but with a defaultValue of null
|
static String |
getElementContent(XMLNode root,
String path,
String defaultvalue)
Returns the value of the last element tag in the path, e.g., <..>
|
static String[] |
getMultiElementContent(XMLNode root,
String path)
Like getElementContents(...) but with a defaultValue of null
|
static String |
getPathString(XMLNode e)
Returns a string describing the current location in the DOM
|
static boolean |
isElementPath(XMLNode root,
String path)
Returns true if the path exists in the document, otherwise false
|
static void |
visitChildrenElements(XMLNode elem,
XMLParsing.ElementVisitor ev) |
static void |
visitElements(XMLNode root,
String path,
XMLParsing.ElementVisitor ev)
Visits all elements which matches the
|
public static boolean isElementPath(XMLNode root, String path)
public static String getPathString(XMLNode e)
public static String getElementContent(XMLNode root, String path)
public static String[] getMultiElementContent(XMLNode root, String path)
public static String getElementContent(XMLNode root, String path, String defaultvalue)
public static XMLNode findElementPath(XMLNode elem, String path)
public static XMLNode findChildElement(XMLNode elem, String tag)
public static void visitElements(XMLNode root, String path, XMLParsing.ElementVisitor ev)
public static void visitChildrenElements(XMLNode elem, XMLParsing.ElementVisitor ev)
Copyright © 2005–2016 Sun Microsystems. All rights reserved.