| java.lang.Object de.danet.an.util.XMLUtil
XMLUtil | public class XMLUtil (Code) | | This class provides some utility functions for handling XML.
author: Michael Lipp version: $Revision: 1.5 $ |
XMLNS_NS | final public static String XMLNS_NS(Code) | | The URI for xmlns attributes.
|
XMLNS_SCHEMA | final public static String XMLNS_SCHEMA(Code) | | The URI for XML schema.
|
XMLNS_SCHEMA_INSTANCE | final public static String XMLNS_SCHEMA_INSTANCE(Code) | | The URI for XML schema instance.
|
XMLNS_XFORMS | final public static String XMLNS_XFORMS(Code) | | The URI for XForms.
|
XMLNS_XHTML | final public static String XMLNS_XHTML(Code) | | The URI for XHTML
|
parseXsdDateTime | public static Date parseXsdDateTime(String dateTime) throws ParseException(Code) | | Parses dateTime string as specified in XML Schema
Part 2, i.e. '-'? CCYY '-' MM '-' DD 'T' hh ':' mm ':' ss ['.' s+]
['Z' | ('+'|'-') hh ':' mm].
Parameters: dateTime - the date and time string. parsed date. throws: ParseException - if the string cannot be parsed. |
parseXsdDuration | public static Duration parseXsdDuration(String duration) throws ParseException(Code) | | Parses duration string as specified in XML Schema
Part 2, i.e. [-]P[nY][nM][nD][T[nH][nM][n[.m]S]], with at
least on value in the time part if it exists or one value in
the date part if the time part does not exist.
Parameters: duration - the duration to be parsed parsed duration throws: ParseException - if the string cannot be parsed |
toXsdGMTDateTime | public static String toXsdGMTDateTime(Date timestamp)(Code) | | Convert a given date to a XSD compliant GMT datetime representation.
Parameters: timestamp - the date to convert. the result. |
toXsdGMTDateTime | public static String toXsdGMTDateTime(long time)(Code) | | Convert date given as milliseconds since January 1, 1970, 00:00:00 GMT
to a XSD compliant GMT datetime representation.
Parameters: time - the time to convert. the result. |
toXsdLocalDateTime | public static String toXsdLocalDateTime(Date timestamp)(Code) | | Convert a given date to a XSD compliant datetime representation with
unspecified timezone (i.e. local time).
Parameters: timestamp - the date to convert. the result. |
toXsdLocalDateTime | public static String toXsdLocalDateTime(long time)(Code) | | Convert date given as milliseconds since January 1, 1970, 00:00:00 GMT
to a XSD compliant datetime representation with unspecified
timezone (i.e. local time).
Parameters: time - the time to convert. the result. |
w3cDomToString | public static String w3cDomToString(Element tree)(Code) | | Converts a W3C DOM tree to an XML string.
Parameters: tree - the W3C DOM root the result |
|
|