public class

XmlUtil

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.encoding.xml.XmlUtil

Class Overview

XML utility methods.

Summary

Public Constructors
XmlUtil()
Public Methods
static boolean compare(String str, int idx, String expected)
static boolean compareCI(String str, int idx, String expected)
static String format(Document doc)
static List<Element> 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, boolean mustBeQuoted, boolean handleBackslashAxmlStyle)
Read a token.
static int readToken(String str, int idx, Collection<Integer> stoppers, String[] atoken)
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 skipWSP(String str, int idx, int minSpaceCount)
Skip WSP characters.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public XmlUtil ()

Public Methods

public static boolean compare (String str, int idx, String expected)

public static boolean compareCI (String str, int idx, String expected)

public static String format (Document doc)

public static List<Element> getChildrenElements (Element e, String childName)

public static Element getFirstChildElement (Element e, String childName)

public static boolean isSpace (int codePoint)

Determine whether the provided code point is a white space character.

public static int readToken (String str, int idx, Collection<Integer> stoppers, String[] atoken, boolean mustBeQuoted, boolean handleBackslashAxmlStyle)

Read a token.

Parameters
idx token start (cannot be a wsp); may be a single-quote or double-quote
atoken output token

public static int readToken (String str, int idx, Collection<Integer> stoppers, String[] atoken)

Read a token.

Parameters
idx token start (cannot be a wsp); may be a single-quote or double-quote
atoken output token

public static int skipSomeSpaces (String str, int idx)

Skip 1+ WSP characters.

public static int skipSpaces (String str, int idx)

Skip 0+ WSP characters.

public static int skipWSP (String str, int idx, int minSpaceCount)

Skip WSP characters.

Parameters
str string
idx start index
minSpaceCount the method will raise if fewer WSP chars were skipped
Returns
  • new index, after skipping WSP chars