public class XMLUtil
extends java.lang.Object
| Constructor and Description |
|---|
XMLUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildXPath(org.w3c.dom.Node from,
org.w3c.dom.Element to)
FOR DIAGNOSTIC PURPOSES ONLY - incomplete
Builds a path to the node relative to the to node provided. |
static org.w3c.dom.NodeList |
combine(org.w3c.dom.NodeList[] nls)
Provides a NodeList of multiple nodelists
|
static javax.xml.parsers.DocumentBuilder |
getDocumentBuilder()
provides a document builder that is namespace aware but not validating by default
|
static javax.xml.parsers.DocumentBuilder |
getDocumentBuilder(boolean namespaceAware,
boolean validating) |
static org.w3c.dom.Document |
newDocument()
utility function for creating a document
|
static org.w3c.dom.Document |
parse(java.io.File source)
utility function for parsing xml
|
static org.w3c.dom.Document |
parse(java.io.InputStream source)
utility function for parsing xml
|
static org.w3c.dom.Document |
parse(int version,
java.lang.String path,
AVMService avmService)
utility function for parsing xml
|
static org.w3c.dom.Document |
parse(org.alfresco.service.cmr.repository.NodeRef nodeRef,
ContentService contentService)
utility function for parsing xml
|
static org.w3c.dom.Document |
parse(java.io.Reader source)
utility function for parsing xml
|
static org.w3c.dom.Document |
parse(java.lang.String source)
utility function for parsing xml
|
static void |
print(org.w3c.dom.Node n,
java.io.File output)
utility function for serializing a node
|
static void |
print(org.w3c.dom.Node n,
java.io.Writer output)
utility function for serializing a node
|
static void |
print(org.w3c.dom.Node n,
java.io.Writer output,
boolean indent)
utility function for serializing a node
|
static java.lang.String |
toString(org.w3c.dom.Node n)
utility function for serializing a node
|
static java.lang.String |
toString(org.w3c.dom.Node n,
boolean indent)
utility function for serializing a node
|
public static org.w3c.dom.Document newDocument()
public static void print(org.w3c.dom.Node n,
java.io.Writer output)
public static void print(org.w3c.dom.Node n,
java.io.Writer output,
boolean indent)
public static void print(org.w3c.dom.Node n,
java.io.File output)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String toString(org.w3c.dom.Node n)
public static java.lang.String toString(org.w3c.dom.Node n,
boolean indent)
public static org.w3c.dom.Document parse(java.lang.String source)
throws org.xml.sax.SAXException,
java.io.IOException
org.xml.sax.SAXExceptionjava.io.IOExceptionpublic static org.w3c.dom.Document parse(org.alfresco.service.cmr.repository.NodeRef nodeRef,
ContentService contentService)
throws org.xml.sax.SAXException,
java.io.IOException
org.xml.sax.SAXExceptionjava.io.IOExceptionpublic static org.w3c.dom.Document parse(int version,
java.lang.String path,
AVMService avmService)
throws org.xml.sax.SAXException,
java.io.IOException
org.xml.sax.SAXExceptionjava.io.IOExceptionpublic static org.w3c.dom.Document parse(java.io.File source)
throws org.xml.sax.SAXException,
java.io.IOException
org.xml.sax.SAXExceptionjava.io.IOExceptionpublic static org.w3c.dom.Document parse(java.io.InputStream source)
throws org.xml.sax.SAXException,
java.io.IOException
org.xml.sax.SAXExceptionjava.io.IOExceptionpublic static org.w3c.dom.Document parse(java.io.Reader source)
throws org.xml.sax.SAXException,
java.io.IOException
org.xml.sax.SAXExceptionjava.io.IOExceptionpublic static javax.xml.parsers.DocumentBuilder getDocumentBuilder()
public static java.lang.String buildXPath(org.w3c.dom.Node from,
org.w3c.dom.Element to)
from - the node from which to build the xpathto - an ancestor of from which will be the root of the pathpublic static javax.xml.parsers.DocumentBuilder getDocumentBuilder(boolean namespaceAware,
boolean validating)
public static org.w3c.dom.NodeList combine(org.w3c.dom.NodeList[] nls)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.