org.exolab.adaptx.xml
Class XMLUtil
java.lang.Object
org.exolab.adaptx.xml.XMLUtil
public class XMLUtil
extends java.lang.Object
A utility class for parsing XML Namespaces and Locales
- Keith Visco
static String | getLocalPart(String qName) - Returns the local part of the qualified XML name
|
static Locale | getLocale(String xmlLang) - Creates a new Locale base on the value of the lang attribute
|
static String | getNameSpacePrefix(String qName) - Returns the namespace part of the qualified XML name
|
static boolean | isWhitespace(String text) - Returns true if the given String contains only whitespace
characters
|
static boolean | isWhitespace(char[] chars, int start, int length) - Returns true if the given String contains only whitespace
characters
|
EMPTY_STRING
public static final String EMPTY_STRING
LOCAL_SEP
public static final char LOCAL_SEP
NAME_SPACE_SEP
public static final char NAME_SPACE_SEP
XMLNS
public static final String XMLNS
getLocalPart
public static String getLocalPart(String qName)
Returns the local part of the qualified XML name
qName
- the qualified XML name
- the local part of the qualified XML name
getLocale
public static Locale getLocale(String xmlLang)
Creates a new Locale base on the value of the lang attribute
- the Local base on the lang attribute
getNameSpacePrefix
public static String getNameSpacePrefix(String qName)
Returns the namespace part of the qualified XML name
qName
- the qualified XML name
- the namespace part of the qualified XML name
isWhitespace
public static boolean isWhitespace(String text)
Returns true if the given String contains only whitespace
characters
- true if the given String contains only whitespace
characters, otherwise false.
isWhitespace
public static boolean isWhitespace(char[] chars,
int start,
int length)
Returns true if the given String contains only whitespace
characters
- true if the given String contains only whitespace
characters, otherwise false.