@InterfaceAudience.Private @InterfaceStability.Unstable public class XMLUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
XMLUtils.InvalidXmlException
Exception that reflects an invalid XML document.
|
static class |
XMLUtils.Stanza
Represents a bag of key-value pairs encountered during parsing an XML
file.
|
static class |
XMLUtils.UnmanglingError
Exception that reflects a string that cannot be unmangled.
|
| Constructor and Description |
|---|
XMLUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addSaxString(ContentHandler contentHandler,
String tag,
String val)
Add a SAX tag with a string inside.
|
static String |
mangleXmlString(String str)
Mangle a string so that it can be represented in an XML document.
|
static String |
unmangleXmlString(String str)
Demangle a string from an XML document.
|
public static String mangleXmlString(String str)
str - The input string.public static String unmangleXmlString(String str) throws XMLUtils.UnmanglingError
mangleXmlString(String) for a description of the mangling
format.str - The string to be demangled.XMLUtils.UnmanglingError - if the input is malformed.public static void addSaxString(ContentHandler contentHandler, String tag, String val) throws SAXException
contentHandler - the SAX content handlertag - the element tag to usevalue - the string to put inside the tagSAXExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.