jd.xml.util
Class XmlUtil

java.lang.Object
  extended byjd.xml.util.XmlUtil

public abstract class XmlUtil
extends Object

A collection of xml related utility methods.


Field Summary
static String XINCLUDE_NAMESPACE_URI
          The XInclude namespace URI.
static String XML_NAMESPACE_URI
          The XML namespace URI.
static String XMLNS_NAMESPACE_URI
          The XMLNS namespace URI.
static String XSLT_NAMESPACE_URI
          The XSLT namespace URI.
 
Constructor Summary
XmlUtil()
           
 
Method Summary
static String getLocalPart(String name)
          Return the local part of an element name.
static Hashtable getPiPseudoAttributes(String piData)
          Parse the data of a processing instruction into name-value pairs.
static String getPrefix(String name)
          Return the prefix of an element name or null if does not have one.
static boolean isNCName(String s)
          Test if the string is a valid NCName.
static boolean isNCNameChar(char c)
          Test if the character is a valid character of a NCName.
static boolean isNCNameStartChar(char c)
          Test if the character is a valid start character of a NCName.
static boolean isQName(String s)
          Test if the string is a valid QName.
static boolean isWhitespace(char c)
          Test if a character is a whitespace character (i.e.
static boolean isWhitespaceString(char[] chars, int start, int length)
          Test if a string contains only whitespace characters (i.e.
static boolean isWhitespaceString(String s)
          Test if a string contains only whitespace characters (i.e.
static boolean startsSurrogatePair(char c)
          Test if a character is the first of a unicode surrogate pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_NAMESPACE_URI

public static final String XML_NAMESPACE_URI
The XML namespace URI.

See Also:
Constant Field Values

XMLNS_NAMESPACE_URI

public static final String XMLNS_NAMESPACE_URI
The XMLNS namespace URI.

See Also:
Constant Field Values

XSLT_NAMESPACE_URI

public static final String XSLT_NAMESPACE_URI
The XSLT namespace URI.

See Also:
Constant Field Values

XINCLUDE_NAMESPACE_URI

public static final String XINCLUDE_NAMESPACE_URI
The XInclude namespace URI.

See Also:
Constant Field Values
Constructor Detail

XmlUtil

public XmlUtil()
Method Detail

isWhitespaceString

public static boolean isWhitespaceString(String s)
Test if a string contains only whitespace characters (i.e. 0x20, 0x09, 0x0D or 0x0A).


isWhitespaceString

public static boolean isWhitespaceString(char[] chars,
                                         int start,
                                         int length)
Test if a string contains only whitespace characters (i.e. 0x20, 0x09, 0x0D or 0x0A).


isWhitespace

public static boolean isWhitespace(char c)
Test if a character is a whitespace character (i.e. 0x20, 0x09, 0x0D or 0x0A).


startsSurrogatePair

public static boolean startsSurrogatePair(char c)
Test if a character is the first of a unicode surrogate pair.


isNCNameStartChar

public static boolean isNCNameStartChar(char c)
Test if the character is a valid start character of a NCName.


isNCNameChar

public static boolean isNCNameChar(char c)
Test if the character is a valid character of a NCName.


isNCName

public static boolean isNCName(String s)
Test if the string is a valid NCName.


isQName

public static boolean isQName(String s)
Test if the string is a valid QName.


getLocalPart

public static String getLocalPart(String name)
Return the local part of an element name.


getPrefix

public static String getPrefix(String name)
Return the prefix of an element name or null if does not have one.


getPiPseudoAttributes

public static Hashtable getPiPseudoAttributes(String piData)
Parse the data of a processing instruction into name-value pairs.