More information


de.spieleck.pcs.util
Class XmlUtility

java.lang.Object
  |
  +--de.spieleck.pcs.util.XmlUtility

public class XmlUtility
extends java.lang.Object

This class provides methods for easily accessing values in XML strings. It uses no DOM or SAX, just string methods. So there is hopefully no useless overhead.


Constructor Summary
XmlUtility()
           
 
Method Summary
static java.lang.String extractXmlValue(java.lang.String xmlSource, java.lang.String tag)
          returns the text within the first given occurrance of an XML element named tag in the string named xmlSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlUtility

public XmlUtility()
Method Detail

extractXmlValue

public static java.lang.String extractXmlValue(java.lang.String xmlSource,
                                               java.lang.String tag)
returns the text within the first given occurrance of an XML element named tag in the string named xmlSource.
Parameters:
tag - the element which test is searched for
xmlSource - the XML string used as source
Returns:
a string containing the text of the first element named tag or null if so such tag was found or it has no text.

More information