@Private
@Unstable
public class XMLUtils
extends java.lang.Object
| Modifier and Type | Class | 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 | Description |
|---|---|
XMLUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
addSaxString(org.xml.sax.ContentHandler contentHandler,
java.lang.String tag,
java.lang.String val) |
Add a SAX tag with a string inside.
|
static java.lang.String |
mangleXmlString(java.lang.String str,
boolean createEntityRefs) |
Mangle a string so that it can be represented in an XML document.
|
static java.lang.String |
unmangleXmlString(java.lang.String str,
boolean decodeEntityRefs) |
Demangle a string from an XML document.
|
public static java.lang.String mangleXmlString(java.lang.String str,
boolean createEntityRefs)
str - The input string.public static java.lang.String unmangleXmlString(java.lang.String str,
boolean decodeEntityRefs)
throws XMLUtils.UnmanglingError
mangleXmlString(String, boolean) for a description of the
mangling format.str - The string to be demangled.XMLUtils.UnmanglingError - if the input is malformed.public static void addSaxString(org.xml.sax.ContentHandler contentHandler,
java.lang.String tag,
java.lang.String val)
throws org.xml.sax.SAXException
contentHandler - the SAX content handlertag - the element tag to useval - the string to put inside the tagorg.xml.sax.SAXExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.