Class XmlUtil
java.lang.Object
com.pnfsoftware.jeb.util.encoding.xml.XmlUtil
XML utility methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic booleanstatic StringgetChildrenElements(Element e, String childName) static ElementgetFirstChildElement(Element e, String childName) static booleanisSpace(int codePoint) Determine whether the provided code point is a white space character.static intreadToken(String str, int idx, Collection<Integer> stoppers, String[] atoken) Read a token.static intreadToken(String str, int idx, Collection<Integer> stoppers, String[] atoken, boolean mustBeQuoted, boolean handleBackslashAxmlStyle) Read a token.static intskipSomeSpaces(String str, int idx) Skip 1+ WSP characters.static intskipSpaces(String str, int idx) Skip 0+ WSP characters.static intSkip 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
-