| java.lang.Object org.apache.axis2.util.XMLUtils
XMLUtils | public class XMLUtils (Code) | | |
Inner Class :public static class ParserErrorHandler implements ErrorHandler | |
Method Summary | |
public static String | base64encode(byte[] bytes) | public static Node | findNode(Node node, QName name) Finds a Node with a given QNameb. | public static String | getChildCharacterData(Element parentEl) Concatinates all the text and cdata node children of this elem and returns
the resulting text.
(by Matt Duftler)
Parameters: parentEl - the element whose cdata/text node values are tobe combined. | public static InputSource | getEmptyInputSource() | public static InputSource | getInputSourceFromURI(String uri) Utility to get the bytes uri. | public static String | getNamespace(String prefix, Node e) | public static String | getPrefix(String uri, Node e) | public static QName | getQNameFromString(String str, Node e) Returns a QName when passed a string like "foo:bar" by mapping
the "foo" prefix to a namespace in the context of the given Node. | public static String | getStringForQName(QName qname, Element e) Returns a string for a particular QName, mapping a new prefix
if necessary. | public static void | initSAXFactory(String factoryClassName, boolean namespaceAware, boolean validating) Initializes the SAX parser factory.
Parameters: factoryClassName - The (optional) class name of the desiredSAXParserFactory implementation. | public static Document | newDocument() Gets an empty new Document. | public static Document | newDocument(InputSource inp) Gets a new Document read from the input source. | public static Document | newDocument(InputStream inp) | public static Document | newDocument(String uri) | public static Document | newDocument(String uri, String username, String password) Creates a new document from the given URI. | public static void | releaseSAXParser(SAXParser parser) Returns a SAX parser for reuse. | public static Element | toDOM(OMElement element) Converts a given OMElement to a DOM Element. | public static OMElement | toOM(Element element) Converts a given DOM Element to an OMElement. | public static OMNode | toOM(InputStream inputStream) | public static OMNode | toOM(Reader reader) |
base64encode | public static String base64encode(byte[] bytes)(Code) | | |
findNode | public static Node findNode(Node node, QName name)(Code) | | Finds a Node with a given QNameb.
Parameters: node - parent node Parameters: name - QName of the child we need to find Returns child node. |
getChildCharacterData | public static String getChildCharacterData(Element parentEl)(Code) | | Concatinates all the text and cdata node children of this elem and returns
the resulting text.
(by Matt Duftler)
Parameters: parentEl - the element whose cdata/text node values are tobe combined. Returns the concatinated string. |
getInputSourceFromURI | public static InputSource getInputSourceFromURI(String uri)(Code) | | Utility to get the bytes uri.
Does NOT handle authenticated URLs,
use getInputSourceFromURI(uri, username, password)
Parameters: uri - the resource to get |
getQNameFromString | public static QName getQNameFromString(String str, Node e)(Code) | | Returns a QName when passed a string like "foo:bar" by mapping
the "foo" prefix to a namespace in the context of the given Node.
Returns a QName generated from the given string representation. |
getStringForQName | public static String getStringForQName(QName qname, Element e)(Code) | | Returns a string for a particular QName, mapping a new prefix
if necessary.
|
initSAXFactory | public static void initSAXFactory(String factoryClassName, boolean namespaceAware, boolean validating)(Code) | | Initializes the SAX parser factory.
Parameters: factoryClassName - The (optional) class name of the desiredSAXParserFactory implementation. Will beassigned to the system propertyjavax.xml.parsers.SAXParserFactoryunless this property is already set.If null , leaves current settingalone. Parameters: namespaceAware - true if we want a namespace-aware parser Parameters: validating - true if we want a validating parser |
releaseSAXParser | public static void releaseSAXParser(SAXParser parser)(Code) | | Returns a SAX parser for reuse.
Parameters: parser - A SAX parser that is available for reuse |
toDOM | public static Element toDOM(OMElement element) throws Exception(Code) | | Converts a given OMElement to a DOM Element.
Parameters: element - Returns Element. throws: Exception - |
toOM | public static OMElement toOM(Element element) throws Exception(Code) | | Converts a given DOM Element to an OMElement.
Parameters: element - Returns OMElement. throws: Exception - |
|
|