Package org.exoplatform.commons.xml
Class XMLDeclarationParser
java.lang.Object
org.exoplatform.commons.xml.XMLDeclarationParser
Parses XML 1.0 and XML 1.1 declarations. This class can be used in a situation where the actual encoding of an XML document
is known but the encoding stated in the XML declaration of the given XML file needs to be determined, e.g. if it is necessary
to find out if the declared encoding is the same as the actual encoding.
Usage Example:
new XMLDeclarationParser("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").parse().get(XMLDeclarationParser.ENCODING)
returns "UTF-8"- Author:
- ppalaga@redhat.com
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
APOS
public static final char APOS- See Also:
-
CR
public static final char CR- See Also:
-
EQ
public static final char EQ- See Also:
-
GT
public static final char GT- See Also:
-
LF
public static final char LF- See Also:
-
LT
public static final char LT- See Also:
-
QUESTION_MARK
public static final char QUESTION_MARK- See Also:
-
QUOT
public static final char QUOT- See Also:
-
SPACE
public static final char SPACE- See Also:
-
TAB
public static final char TAB- See Also:
-
ENCODING
- See Also:
-
STANDALONE
- See Also:
-
VERSION
- See Also:
-
XML
- See Also:
-
-
Constructor Details
-
XMLDeclarationParser
-
XMLDeclarationParser
-
-
Method Details
-
parse
- Throws:
SAXExceptionIOException
-