|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.conversation.base.XmlParsingUtils
Class XmlParsingUtils provides a few convenience functions used in parsing XML files.
These functions are used by CpXmlParser, but they're
split out into their own class
because they can be applied to general XML documents, not just cpXML docs, and to simplify
the already-bloated CpXmlParser class.
| Method Summary | |
|---|---|
static java.lang.String |
getLeafText(org.w3c.dom.Element element)
Returns the text inside a leaf element. |
static long |
millisFromDuration(java.lang.String durationString)
Converts an xs:duration string to milliseconds, using the current System Date as starting Date. |
static long |
millisFromDuration(java.lang.String durationString,
java.util.Date startDate)
Converts an xs:duration string to milliseconds, as measured from the
given Date. |
static void |
testMillisFromDuration(java.lang.String durString)
Runs a unit test of the millisFromDuration() function. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static java.lang.String getLeafText(org.w3c.dom.Element element)
This method assumes that the arg is indeed a leaf (i.e., there are no other elements inside it) and that there is indeed text inside it.
element - The leaf element.
public static long millisFromDuration(java.lang.String durationString)
The starting Date makes a difference only when the duration string specifies some number of years and/or months, since the number of days per month is not constant.
durationString - The xs:duration string.
public static long millisFromDuration(java.lang.String durationString,
java.util.Date startDate)
xs:duration string to milliseconds, as measured from the
given Date.
The starting Date makes a difference only when the duration string specifies some number of years and/or months, since the number of days per month is not constant.
durationString - The xs:duration string.startDate - The Date to use as starting Date.
public static void testMillisFromDuration(java.lang.String durString)
millisFromDuration() function.
Calculates the milliseconds and prints both duration string and milliseconds on standard output.
durString - The duration string to convert to milliseconds.
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||