| java.lang.Object org.jamwiki.utils.XMLUtil
XMLUtil | public class XMLUtil (Code) | | Provides utility methods useful for parsing and processing XML data.
|
Method Summary | |
public static String | buildTag(String tagName, String tagValue, boolean escape) Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. Parameters: escape - If true then any less than, greater than, quotation mark,apostrophe or ampersands in tagValue will be XML-escaped. | public static String | buildTag(String tagName, int tagValue) Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. | public static String | buildTag(String tagName, Integer tagValue) Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. | public static String | buildTag(String tagName, boolean tagValue) Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. | public static String | buildTag(String tagName, Timestamp tagValue) Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. | public static String | buildTag(String tagName, long tagValue) Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. | public static String | getTextContent(Node baseNode) Get XML Node text content. | public static Document | parseXML(File file, boolean validating) Given a File object that points to an XML file, parse the
XML and return a parsed Document object.
Parameters: file - The File object that points to the XML file. Parameters: validating - Set to true if the parser shouldvalidate against a DTD. | public static Document | parseXML(InputSource source, boolean validating) Given an InputSource object that points to XML data, parse
the XML and return a parsed Document object.
Parameters: source - The InputSource object that points to XML data. Parameters: validating - Set to true if the parser shouldvalidate against a DTD. |
buildTag | public static String buildTag(String tagName, String tagValue, boolean escape)(Code) | | Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. Parameters: escape - If true then any less than, greater than, quotation mark,apostrophe or ampersands in tagValue will be XML-escaped. An XML representations of the tagName and tagValue parameters. |
buildTag | public static String buildTag(String tagName, int tagValue)(Code) | | Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. An XML representations of the tagName and tagValue parameters. |
buildTag | public static String buildTag(String tagName, Integer tagValue)(Code) | | Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. An XML representations of the tagName and tagValue parameters. |
buildTag | public static String buildTag(String tagName, boolean tagValue)(Code) | | Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. An XML representations of the tagName and tagValue parameters. |
buildTag | public static String buildTag(String tagName, Timestamp tagValue)(Code) | | Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. An XML representations of the tagName and tagValue parameters. |
buildTag | public static String buildTag(String tagName, long tagValue)(Code) | | Utiltiy method for building an XML tag of the form <tagName>value</tagName>.
Parameters: tagName - The name of the XML tag, such as <tagName>value</tagName>. Parameters: tagValue - The value of the XML tag, such as <tagName>value</tagName>. An XML representations of the tagName and tagValue parameters. |
getTextContent | public static String getTextContent(Node baseNode) throws Exception(Code) | | Get XML Node text content. This method duplicates the
org.w3c.dom.Node.getTextContent() method in JDK 1.5.
Parameters: baseNode - The XML node from which the content is being retrieved. The text content of the XML node. |
parseXML | public static Document parseXML(File file, boolean validating) throws Exception(Code) | | Given a File object that points to an XML file, parse the
XML and return a parsed Document object.
Parameters: file - The File object that points to the XML file. Parameters: validating - Set to true if the parser shouldvalidate against a DTD. A parsed Document object. |
parseXML | public static Document parseXML(InputSource source, boolean validating) throws Exception(Code) | | Given an InputSource object that points to XML data, parse
the XML and return a parsed Document object.
Parameters: source - The InputSource object that points to XML data. Parameters: validating - Set to true if the parser shouldvalidate against a DTD. A parsed Document object. |
|
|