|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.cbse.jeasy.JESimpleParser
public class JESimpleParser
Some simple methods to parse a string in XML format.
The methods use no SAXParser but some native string functions instead.
Its faster than to use a SAXParser.
See a demonstration in the program JEasyExample tab "Adress Form".
| Constructor Summary | |
|---|---|
JESimpleParser()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getElementData(java.lang.String source,
java.lang.String element)
Returns the String between |
static java.lang.String |
getXMLAttribute(java.lang.String source,
java.lang.String attribut)
Parses the String for the attribut (attribut="value") |
static java.lang.String |
getXMLElementAttribute(java.lang.String source,
java.lang.String element,
java.lang.String attribut)
Parses the String for the attribut inside the the given XML-Element inside |
static java.lang.String |
getXMLElementByAttributeValue(java.lang.String source,
java.lang.String element,
java.lang.String attribute,
java.lang.String value)
Parses the String for the given XML-Elements. |
static java.lang.String |
getXMLSubString(java.lang.String source,
java.lang.String element)
Returns the String between |
static java.lang.String |
getXMLSubStringEmpty(java.lang.String source,
java.lang.String element)
Returns the String between |
static java.util.Vector |
getXMLSubStringVector(java.lang.String source,
java.lang.String element)
Parses the String for the given XML-Elements and returns a vector with all text between te starttag and the endtag |
static java.util.Vector |
getXMLVector(java.lang.String source)
Parses the String for all tags and returns them as a vector |
static java.lang.String |
replaceXMLElement(java.lang.String source,
java.lang.String element,
java.lang.String value)
Replaces the String between the first occurrence of |
static java.lang.String |
str2Xml(java.lang.String str)
Replaces < > & and ' into XML entities |
static java.lang.String |
xml2str(java.lang.String str)
Replaces general XML entities inside a ISO-8859-1 encoding String into char |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JESimpleParser()
| Method Detail |
|---|
public static java.lang.String getXMLSubString(java.lang.String source,
java.lang.String element)
source - the string where it will be searchedelement - the XML element to look for
public static java.lang.String getElementData(java.lang.String source,
java.lang.String element)
source - the string where it will be searchedelement - the XML element to look for
public static java.lang.String getXMLSubStringEmpty(java.lang.String source,
java.lang.String element)
source - the string where it will be searchedelement - the XML element to look for
public static java.lang.String getXMLElementAttribute(java.lang.String source,
java.lang.String element,
java.lang.String attribut)
source - the string where it will be searchedelement - the XML element to look for
public static java.lang.String getXMLElementByAttributeValue(java.lang.String source,
java.lang.String element,
java.lang.String attribute,
java.lang.String value)
source - the string where it will be searchedelement - the XML element to look forattribute - the attibute the element must havevalue - and its value
public static java.lang.String getXMLAttribute(java.lang.String source,
java.lang.String attribut)
source - the string where it will be searched
public static java.util.Vector getXMLSubStringVector(java.lang.String source,
java.lang.String element)
source - the string where it will be searchedelement - the XML element to look for
public static java.util.Vector getXMLVector(java.lang.String source)
source - the string where it will be searched
public static java.lang.String replaceXMLElement(java.lang.String source,
java.lang.String element,
java.lang.String value)
source - the string where it will be searchedelement - the XML element to look forvalue - the string to insert
public static java.lang.String xml2str(java.lang.String str)
s - xml-String
public static java.lang.String str2Xml(java.lang.String str)
s - String
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||