|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.wsdl.util.XMLUtils
Nested Class Summary | |
static class |
XMLUtils.ParserErrorHandler
|
Field Summary | |
static java.lang.String |
charEncoding
|
Constructor Summary | |
XMLUtils()
|
Method Summary | |
static java.lang.String |
base64encode(byte[] bytes)
|
static org.w3c.dom.Node |
findNode(org.w3c.dom.Node node,
javax.xml.namespace.QName name)
Find a Node with a given QNameb |
static java.lang.String |
getChildCharacterData(org.w3c.dom.Element parentEl)
Concat all the text and cdata node children of this elem and return the resulting text. |
static org.xml.sax.InputSource |
getEmptyInputSource()
|
static org.xml.sax.InputSource |
getInputSourceFromURI(java.lang.String uri)
Utility to get the bytes uri. |
static java.lang.String |
getNamespace(java.lang.String prefix,
org.w3c.dom.Node e)
|
static java.lang.String |
getPrefix(java.lang.String uri,
org.w3c.dom.Node e)
|
static javax.xml.namespace.QName |
getQNameFromString(java.lang.String str,
org.w3c.dom.Node e)
Return a QName when passed a string like "foo:bar" by mapping the "foo" prefix to a namespace in the context of the given Node. |
static java.lang.String |
getStringForQName(javax.xml.namespace.QName qname,
org.w3c.dom.Element e)
Return a string for a particular QName, mapping a new prefix if necessary. |
static void |
initSAXFactory(java.lang.String factoryClassName,
boolean namespaceAware,
boolean validating)
Initialize the SAX parser factory. |
static org.w3c.dom.Document |
newDocument()
Get an empty new Document |
static org.w3c.dom.Document |
newDocument(org.xml.sax.InputSource inp)
Get a new Document read from the input source |
static org.w3c.dom.Document |
newDocument(java.io.InputStream inp)
Get a new Document read from the input stream |
static org.w3c.dom.Document |
newDocument(java.lang.String uri)
Get a new Document read from the indicated uri |
static org.w3c.dom.Document |
newDocument(java.lang.String uri,
java.lang.String username,
java.lang.String password)
Create a new document from the given URI, use the username and password if the URI requires authentication. |
static void |
releaseSAXParser(javax.xml.parsers.SAXParser parser)
Return a SAX parser for reuse. |
static java.lang.String |
xmlEncodeString(java.lang.String orig)
Encode a string appropriately for XML. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String charEncoding
Constructor Detail |
public XMLUtils()
Method Detail |
public static java.lang.String xmlEncodeString(java.lang.String orig)
orig
- the String to encode
public static void initSAXFactory(java.lang.String factoryClassName, boolean namespaceAware, boolean validating)
factoryClassName
- The (optional) class name of the desired
SAXParserFactory implementation. Will be
assigned to the system property
javax.xml.parsers.SAXParserFactory
unless this property is already set.
If null
, leaves current setting
alone.namespaceAware
- true if we want a namespace-aware parservalidating
- true if we want a validating parserpublic static void releaseSAXParser(javax.xml.parsers.SAXParser parser)
parser
- A SAX parser that is available for reusepublic static org.w3c.dom.Document newDocument() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
- if construction problems occurpublic static org.w3c.dom.Document newDocument(org.xml.sax.InputSource inp) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
javax.xml.parsers.ParserConfigurationException
- if construction problems occur
org.xml.sax.SAXException
- if the document has xml sax problems
java.io.IOException
- if i/o exceptions occurpublic static org.w3c.dom.Document newDocument(java.io.InputStream inp) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
javax.xml.parsers.ParserConfigurationException
- if construction problems occur
org.xml.sax.SAXException
- if the document has xml sax problems
java.io.IOException
- if i/o exceptions occurpublic static org.w3c.dom.Document newDocument(java.lang.String uri) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
javax.xml.parsers.ParserConfigurationException
- if construction problems occur
org.xml.sax.SAXException
- if the document has xml sax problems
java.io.IOException
- if i/o exceptions occurpublic static org.w3c.dom.Document newDocument(java.lang.String uri, java.lang.String username, java.lang.String password) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
uri
- the resource to getusername
- basic auth usernamepassword
- basic auth password
javax.xml.parsers.ParserConfigurationException
- if construction problems occur
org.xml.sax.SAXException
- if the document has xml sax problems
java.io.IOException
- if i/o exceptions occurpublic static java.lang.String getPrefix(java.lang.String uri, org.w3c.dom.Node e)
public static java.lang.String getNamespace(java.lang.String prefix, org.w3c.dom.Node e)
public static javax.xml.namespace.QName getQNameFromString(java.lang.String str, org.w3c.dom.Node e)
public static java.lang.String getStringForQName(javax.xml.namespace.QName qname, org.w3c.dom.Element e)
public static java.lang.String getChildCharacterData(org.w3c.dom.Element parentEl)
parentEl
- the element whose cdata/text node values are to
be combined.
public static org.xml.sax.InputSource getInputSourceFromURI(java.lang.String uri)
uri
- the resource to get#getInputSourceFromURI(String uri, String username, String password)
public static final java.lang.String base64encode(byte[] bytes)
public static org.xml.sax.InputSource getEmptyInputSource()
public static org.w3c.dom.Node findNode(org.w3c.dom.Node node, javax.xml.namespace.QName name)
node
- parent nodename
- QName of the child we need to find
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |