Class XmlUtil
java.lang.Object
com.pnfsoftware.jeb.util.encoding.xml.XmlUtil
XML utility methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static boolean
static String
getChildrenElements
(Element e, String childName) static Element
getFirstChildElement
(Element e, String childName) static boolean
isSpace
(int codePoint) Determine whether the provided code point is a white space character.static int
readToken
(String str, int idx, Collection<Integer> stoppers, String[] atoken) Read a token.static int
readToken
(String str, int idx, Collection<Integer> stoppers, String[] atoken, boolean mustBeQuoted, boolean handleBackslashAxmlStyle) Read a token.static int
skipSomeSpaces
(String str, int idx) Skip 1+ WSP characters.static int
skipSpaces
(String str, int idx) Skip 0+ WSP characters.static int
Skip WSP characters.
-
Constructor Details
-
XmlUtil
public XmlUtil()
-
-
Method Details
-
isSpace
public static boolean isSpace(int codePoint) Determine whether the provided code point is a white space character.- Parameters:
codePoint
-- Returns:
-
skipSomeSpaces
Skip 1+ WSP characters.- Parameters:
str
-idx
-- Returns:
-
skipSpaces
Skip 0+ WSP characters.- Parameters:
str
-idx
-- Returns:
-
skipWSP
Skip WSP characters.- Parameters:
str
- stringidx
- start indexminSpaceCount
- the method will raise if fewer WSP chars were skipped- Returns:
- new index, after skipping WSP chars
-
readToken
Read a token.- Parameters:
str
-idx
- token start (cannot be a wsp); may be a single-quote or double-quotestoppers
-atoken
- output token- Returns:
-
readToken
public static int readToken(String str, int idx, Collection<Integer> stoppers, String[] atoken, boolean mustBeQuoted, boolean handleBackslashAxmlStyle) Read a token.- Parameters:
str
-idx
- token start (cannot be a wsp); may be a single-quote or double-quotestoppers
-atoken
- output tokenmustBeQuoted
-handleBackslashAxmlStyle
-- Returns:
-
compare
-
compareCI
-
getFirstChildElement
-
getChildrenElements
-
format
-