java.lang.Object | |
↳ | org.apache.commons.betwixt.XMLUtils |
XMLUtils
contains basic utility methods for XML.
The code for isWellFormedXMLName(String)
is based on code in
org.apache.xerces.util.XMLChar
in Apache Xerces.
The authors of this class are credited below.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | AMPERSAND_ENTITY | Escaped & entity |
|||||||||
String | APOSTROPHE_ENTITY | Escaped ' entity |
|||||||||
String | GREATER_THAN_ENTITY | Escaped > entity |
|||||||||
String | LESS_THAN_ENTITY | Escaped < entity |
|||||||||
String | QUOTE_ENTITY | Escaped " entity |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor for use by tools that required |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Escape the | |||||||||||
Escape the | |||||||||||
Escapes the given content suitable for insertion within a
CDATA sequence. | |||||||||||
Escapes the given content suitable for insertion within a
CDATA sequence. | |||||||||||
Returns true if the specified character is a valid name
character as defined by the XML 1.0 specification.
| |||||||||||
Returns true if the specified character is a valid name start
character as defined in the XML 1.0 specification.
| |||||||||||
Is this string a well formed xml name? Only certain characters are allowed in well formed element and attribute names in xml. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Constructor for use by tools that required JavaBean
instances.
This constructor is public only
to permit tools that require a JavaBean instance to operate.
XMLUtils
instances should not be constructed in standard
programming. Instead, the class methods should be called directly.
Escape the toString
of the given object.
For use in an attribute value.
value | escape value.toString() |
---|
Escape the toString
of the given object.
For use as body text.
value | escape value.toString() |
---|
Escapes the given content suitable for insertion within a
CDATA
sequence.
Within a CDATA
section, only the CDEnd
string ']]>' is recognized as markup.
content | the body content whose character data should
be escaped in a way appropriate for use within a CDATA
section of xml. |
---|
Escapes the given content suitable for insertion within a
CDATA
sequence.
Within a CDATA
section, only the CDEnd
string ']]>' is recognized as markup.
bufferedContent | the body content within a buffer
whose character data should
be escaped in a way appropriate for use within a CDATA
section of xml
|
---|
Returns true if the specified character is a valid name character as defined by the XML 1.0 specification.
c | The character to check. |
---|
Returns true if the specified character is a valid name start character as defined in the XML 1.0 specification.
c | The character to check. |
---|
Is this string a well formed xml name?
Only certain characters are allowed in well formed element and attribute names in xml. For example, white space is not allowed in a name.
The code for this method is based on code in
org.apache.xerces.util.XMLChar
in Apache Xerces.
The authors of this class are credited at the top of this class.
name | the String to be checked for use as an xml attribute
or element name. Returns false if name is null |
---|