|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.prosyst.util.xml.XMLUtil
public class XMLUtil
Class with utility methods for extracting attributes from xml tags
| Field Summary | |
|---|---|
static java.lang.String[] |
coded
Coded chars placed in the xml content. |
static java.lang.String[] |
decoded
Corresponding decoded chars. |
protected static char[] |
f_ent_chars
|
protected static java.lang.String[] |
f_entities
Checks whether the tag name string between < and >, ends with "/". |
| Constructor Summary | |
|---|---|
XMLUtil()
|
|
| Method Summary | |
|---|---|
static java.util.Vector |
getAttributeNames(java.lang.String tag)
Deprecated. use TagClass.getAttrList() instead |
static java.lang.String |
getAttributeValue(java.lang.String tag,
java.lang.String att,
int begin)
Deprecated. use TagClass.getAttrList() and TagClass.getAttribute(String attr) instead |
static java.util.Vector |
getAttributeValues(java.lang.String tag)
Deprecated. use TagClass.getAttrList() instead |
static java.lang.String |
getContent(TagClass tag,
int pos,
java.lang.String name)
Deprecated. use TagClass.getContent(int pos, String name) instead |
static java.lang.String |
getDecoded(java.lang.String src)
Converts special xml chars to valid string e.g. |
static java.lang.String |
getTagName(java.lang.String tagAndAttributes)
Deprecated. use TagClass.getName() instead |
static boolean |
isEmptyTag(java.lang.String tagName)
|
static void |
replace(java.lang.String src,
java.lang.String toBeReplaced,
java.lang.String toReplaceWith,
com.prosyst.util.string.CharBuffer strBuf)
Replaces a specified string in a source string with a corresponding string and adds the result in a buffer. |
static java.lang.String |
replaceChars(java.lang.String str,
java.lang.String[] toBeReplaced,
java.lang.String[] replaceWith,
int length)
Replaces specified strings in a source string with corresponding strings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String[] coded
public static java.lang.String[] decoded
protected static final java.lang.String[] f_entities
protected static final char[] f_ent_chars
| Constructor Detail |
|---|
public XMLUtil()
| Method Detail |
|---|
public static java.lang.String replaceChars(java.lang.String str,
java.lang.String[] toBeReplaced,
java.lang.String[] replaceWith,
int length)
str - source stringtoBeReplaced - array of strings which will be replaced with the next parameterreplaceWith - array of the strings corresponding to "toBeReplaced" parameter. the length should be equallength - specify how many parameters of the string array will be replaced,
the rest of "toBeReplaced" parameter will not.
public static void replace(java.lang.String src,
java.lang.String toBeReplaced,
java.lang.String toReplaceWith,
com.prosyst.util.string.CharBuffer strBuf)
src - source stringtoBeReplaced - string which will be replaced with the next parametertoReplaceWith - the string corresponding to "toBeReplaced" parameter.strBuf - here is added the replaced source string.public static java.lang.String getDecoded(java.lang.String src)
src - source string which is coded
public static java.lang.String getTagName(java.lang.String tagAndAttributes)
tagAndAttributes - string containing the name and attributes
public static boolean isEmptyTag(java.lang.String tagName)
public static java.lang.String getAttributeValue(java.lang.String tag,
java.lang.String att,
int begin)
tag - whole tag nameatt - attribute name
public static java.util.Vector getAttributeNames(java.lang.String tag)
tag - whole tag name
public static java.util.Vector getAttributeValues(java.lang.String tag)
tag - whole tag name
public static java.lang.String getContent(TagClass tag,
int pos,
java.lang.String name)
throws java.lang.IllegalArgumentException
tag - parent tagpos - position of the searched tag in child array of the parent tagname - name of the searched tag
java.lang.IllegalArgumentException - if the specified name does not match the
name of the tag at specified position
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||