Package org.eigenbase.xom
Class XOMUtil
java.lang.Object
org.eigenbase.xom.XMLUtil
org.eigenbase.xom.XOMUtil
Utility functions for the
org.eigenbase.xom and
org.eigenbase.xom.wrappers packages.- Since:
- 3 October, 2001
- Version:
- $Id: //open/util/resgen/src/org/eigenbase/xom/XOMUtil.java#5 $
- Author:
- jhyde
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final NodeDef[](package private) static final int(package private) static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddChild(ElementDef parent, ElementDef child) static voidaddChild(ElementDef parent, NodeDef child) static voidaddChildren(ElementDef parent, NodeDef[] children) Adds a set of children to an object, using its best guess as to where to put them.static Object[]addElement(Object[] a, Object o) Adds an object to the end of an array.(package private) static Stringcapitalize(String name) Converts the first letter ofnameto upper-case.static Object[]concatenate(Object[] a0, Object[] a1) Concatenates two arrays.static ParserCreates aParserof the default parser type.static voiddiscard(boolean b) When the compiler is complaining that you are not using a variable, just call one of these routines with it.static voiddiscard(byte b) static voiddiscard(char c) static voiddiscard(double d) static voiddiscard(float d) static voiddiscard(int i) static voiddiscard(long l) static voiddiscard(short s) static voidstatic ObjectgetFirstInstance(Object[] a, Class clazz) Returns the first member of an array of objects which is an instance of a given class, or null if there is no such.(package private) static ParsermakeParser(int parserType, boolean usesPlugins, String fileDirectory, String dtdName, String docType) Creates a parser of given type.static StringwrapperToXml(DOMWrapper wrapper, boolean ignorePcdata) Methods inherited from class org.eigenbase.xom.XMLUtil
getFirstTagName, printAtt, printAtt, printAtt, printAtt, printPCDATA, printPCDATA, printPCDATA, quoteAtt, quoteAtt, quoteAtt, quoteAtt, quotePCDATA, stringEncodeXML, stringHasXMLSpecials
-
Field Details
-
emptyNodeArray
-
MSXML
static final int MSXML- See Also:
-
XERCES
static final int XERCES- See Also:
-
-
Constructor Details
-
XOMUtil
public XOMUtil()
-
-
Method Details
-
discard
public static void discard(boolean b) When the compiler is complaining that you are not using a variable, just call one of these routines with it. -
discard
public static void discard(byte b) -
discard
public static void discard(char c) -
discard
public static void discard(double d) -
discard
public static void discard(float d) -
discard
public static void discard(int i) -
discard
public static void discard(long l) -
discard
-
discard
public static void discard(short s) -
capitalize
Converts the first letter ofnameto upper-case. -
addElement
Adds an object to the end of an array. The resulting array is of the same type (e.g.String[]) as the input array. -
concatenate
Concatenates two arrays. The resulting array is of the same type (e.g.String[]) as the first array. -
addChildren
Adds a set of children to an object, using its best guess as to where to put them.- Throws:
XOMException
-
addChild
- Throws:
XOMException
-
addChild
- Throws:
XOMException
-
createDefaultParser
Creates aParserof the default parser type.- Throws:
XOMException
-
makeParser
static Parser makeParser(int parserType, boolean usesPlugins, String fileDirectory, String dtdName, String docType) throws XOMException Creates a parser of given type.- Parameters:
parserType- valid values areMSXMLandXERCES.- Throws:
XOMException
-
getFirstInstance
Returns the first member of an array of objects which is an instance of a given class, or null if there is no such. -
wrapperToXml
-