|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.skype.tutorial.util.XmlStrMgr
public class XmlStrMgr
Collect common "parse" XML document fields and encapsulate common code as methods.
| Field Summary | |
|---|---|
static java.lang.String |
MY_CLASS_TAG
Info/Debug console output message prefix/identifier tag. |
private static java.text.DecimalFormat |
parseFmt
|
private static java.text.ParsePosition |
parsePos
|
private java.lang.Number |
parseResult
|
private boolean |
verboseDebugLvl
Debug console output level: true for verbose; false for normal (default). |
| Constructor Summary | |
|---|---|
XmlStrMgr()
|
|
| Method Summary | |
|---|---|
boolean |
getVerboseDebug()
Determine whether verbose debug is set. |
java.text.ParsePosition |
getXmlSubStrPos(java.lang.String xmlDoc,
java.lang.String subStr,
java.text.ParsePosition xmlStart)
"Parse" an XML document for the first occurrence of a particular substring and return the position of the character following it. |
int |
getXmlValueNum(java.lang.String xmlDoc,
java.lang.String xmlTag,
java.text.ParsePosition xmlStart)
"Parse" an XML document for the first occurrence of a particular tag and return its value. |
java.lang.String |
getXmlValueStr(java.lang.String xmlDoc,
java.lang.String xmlTag,
java.text.ParsePosition xmlStart)
"Parse" an XML document for the first occurrence of a particular tag and return its value. |
void |
setVerboseDebug(boolean onOff)
Turn verbose debug on/off. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MY_CLASS_TAG
private boolean verboseDebugLvl
private static java.text.ParsePosition parsePos
private java.lang.Number parseResult
private static java.text.DecimalFormat parseFmt
| Constructor Detail |
|---|
public XmlStrMgr()
| Method Detail |
|---|
public java.lang.String getXmlValueStr(java.lang.String xmlDoc,
java.lang.String xmlTag,
java.text.ParsePosition xmlStart)
xmlDoc - The target XML document.xmlTag - The target tag including the enclosing angle brackets.xmlStart - The character position (from zero) in the document at which to start
looking for the target tag.
<part></part>
public int getXmlValueNum(java.lang.String xmlDoc,
java.lang.String xmlTag,
java.text.ParsePosition xmlStart)
xmlDoc - The target XML document.xmlTag - The target tag including the enclosing angle brackets.xmlStart - The character position (from zero) in the document at which to start
looking for the target tag.
<part></part>
public java.text.ParsePosition getXmlSubStrPos(java.lang.String xmlDoc,
java.lang.String subStr,
java.text.ParsePosition xmlStart)
xmlDoc - The target XML document.subStr - The target substring, typically an opening XML tag and its initial attribute
or a closing XML tag, such as:
<part identity="</part>xmlStart - The character position (from zero) in the document at which to start
looking for the target substring.
public boolean getVerboseDebug()
public void setVerboseDebug(boolean onOff)
onOff -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||