public final class XmlUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CHARSET
Default encoding used.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
appendChild(SgmlPage page,
DomNode parent,
Node child,
boolean handleXHTMLAsHTML)
|
static Document |
buildDocument(WebResponse webResponse)
Builds a document from the content of the web response.
|
static String |
lookupNamespaceURI(DomElement element,
String prefix)
Search for the namespace URI of the given prefix, starting from the specified element.
|
static String |
lookupPrefix(DomElement element,
String namespace)
Search for the prefix associated with specified namespace URI.
|
public static final String DEFAULT_CHARSET
public static Document buildDocument(WebResponse webResponse) throws IOException, SAXException, ParserConfigurationException
webResponse - the response from the serverIOException - if the page could not be createdSAXException - if the parsing failsParserConfigurationException - if a DocumentBuilder cannot be createdpublic static void appendChild(SgmlPage page, DomNode parent, Node child, boolean handleXHTMLAsHTML)
page - the owner page of DomElements to be createdparent - the parent DomNodechild - the child NodehandleXHTMLAsHTML - if true elements from the XHTML namespace are handled as HTML elements instead of
DOM elementspublic static String lookupNamespaceURI(DomElement element, String prefix)
element - the element to start searching fromprefix - the namespace prefixpublic static String lookupPrefix(DomElement element, String namespace)
element - the element to start searching fromnamespace - the namespace prefixCopyright © 2002–2015 Gargoyle Software Inc.. All rights reserved.