|
DODS 6.5 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.dods.xml.XmlUtil
Field Summary | |
protected org.w3c.dom.Document |
document
|
protected java.lang.String |
xmlFile
|
Constructor Summary | |
XmlUtil(java.lang.String xmlFile)
|
Method Summary | |
int |
getNumberOfNodes(java.lang.String key)
Return number of nodes defined by key parameter. |
int |
getNumberOfNodes(java.lang.String key,
int[] levelNodes)
Return number of nodes defined by key parameter. |
static int |
getNumberOfNodes(java.lang.String xmlfile,
java.lang.String key,
int[] levelNodes)
Return number of nodes defined by key parameter. |
java.lang.String |
getSingleAttribute(java.lang.String key)
Return value of single text node defined by key parameter. |
java.lang.String |
getSingleAttribute(java.lang.String key,
int[] levelNodes)
Return value of attribute node defined by key parameter. |
static java.lang.String |
getSingleAttribute(java.lang.String xmlfile,
java.lang.String key,
int[] levelNodes)
Return value of node attribute defined by key parameter. |
java.lang.String |
getSingleTextNode(java.lang.String key)
Return value of single text node defined by key parameter. |
java.lang.String |
getSingleTextNode(java.lang.String key,
int[] levelNodes)
Return value of single text node defined by key parameter. |
static java.lang.String |
getSingleTextNode(java.lang.String xmlfile,
java.lang.String key,
int[] levelNodes)
Return value of single text node defined by key parameter. |
static void |
main(java.lang.String[] args)
|
void |
setSingleAttribute(java.lang.String key,
int[] levelNodes,
java.lang.String value)
Set value of attribute node defined by key parameter. |
static void |
setSingleAttribute(java.lang.String xmlfile,
java.lang.String key,
int[] levelNodes,
java.lang.String value,
java.util.Properties prop)
Set and save value of attribute node defined by key parameter. |
void |
store()
Store DOM source in xml file. |
void |
store(java.util.Properties properties)
Store DOM source in xml file. |
void |
store(java.lang.String fileName,
java.util.Properties properties)
Store DOM source in xml file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String xmlFile
protected org.w3c.dom.Document document
Constructor Detail |
public XmlUtil(java.lang.String xmlFile) throws XmlUtilException
Method Detail |
public void store() throws XmlUtilException
XmlUtilException
public void store(java.util.Properties properties) throws XmlUtilException
properties
- Output properties for xml file.
XmlUtilException
public void store(java.lang.String fileName, java.util.Properties properties) throws XmlUtilException
properties
- Output properties for xml file.fileName
- Output xml file name.
XmlUtilException
public java.lang.String getSingleTextNode(java.lang.String key) throws XmlUtilException
key
- Full name of tag which is about to be read. The tags in the key are separated by "/"
(e.g. /doml/database).
XmlUtilException
public java.lang.String getSingleTextNode(java.lang.String key, int[] levelNodes) throws XmlUtilException
key
- Full name of tag which is about to be read. The tags in the key are separated by "/"
(e.g. /doml/database).levelNodes
- Array of ordinal numbers. There is one number for each tag level
(starting from level 0). These numbers tell to which appearance of specific
tag key tag belongs to. It is not necessary to provide all tag levels.
XmlUtilException
public java.lang.String getSingleAttribute(java.lang.String key) throws XmlUtilException
key
- Full name of tag attribute which is about to be read. The tags in the key
are separated by "/". Name of the attribute is separated by "@" from tag name
(e.g. /doml/database@templateset).
XmlUtilException
public java.lang.String getSingleAttribute(java.lang.String key, int[] levelNodes) throws XmlUtilException
key
- Full name of tag attribute which is about to be read. The tags in the key
are separated by "/". Name of the attribute is separated by "@" from tag name
(e.g. /doml/database@templateset).levelNodes
- Array of ordinal numbers. There is one number for each tag level
(starting from level 0). These numbers tell to which appearance of specific
tag key tag belongs to. It is not necessary to provide all tag levels.
XmlUtilException
public void setSingleAttribute(java.lang.String key, int[] levelNodes, java.lang.String value) throws XmlUtilException
key
- Full name of tag attribute which is about to be read. The tags in the key
are separated by "/". Name of the attribute is separated by "@" from tag name
(e.g. /doml/database@templateset).levelNodes
- Array of ordinal numbers. There is one number for each tag level
(starting from level 0). These numbers tell to which appearance of specific
tag key tag belongs to. It is not necessary to provide all tag levels.value
- New value of attribute node.
XmlUtilException
public int getNumberOfNodes(java.lang.String key) throws XmlUtilException
key
- Full name of tag which is about to be read. The tags in the key are separated by "/"
(e.g. /doml/database).
XmlUtilException
public int getNumberOfNodes(java.lang.String key, int[] levelNodes) throws XmlUtilException
key
- Full name of tag which is about to be read. The tags in the key are separated by "/"
(e.g. /doml/database).levelNodes
- Array of ordinal numbers. There is one number for each tag level
(starting from level 0). These numbers tell to which appearance of specific
tag key tag belongs to. It is not necessary to provide all tag levels.
XmlUtilException
public static java.lang.String getSingleTextNode(java.lang.String xmlfile, java.lang.String key, int[] levelNodes) throws XmlUtilException
xmlfile
- full path name of xml file which is about to be read.key
- Full name of tag which is about to be read. The tags in the key are separated by "/"
(e.g. /doml/database).levelNodes
- Array of ordinal numbers. There is one number for each tag level
(starting from level 0). These numbers tell to which appearance of specific
tag key tag belongs to. It is not necessary to provide all tag levels.
XmlUtilException
public static java.lang.String getSingleAttribute(java.lang.String xmlfile, java.lang.String key, int[] levelNodes) throws XmlUtilException
xmlfile
- full path name of xml file which is about to be read.key
- Full name of tag which is about to be read. The tags in the key are separated by "/"
(e.g. /doml/database).levelNodes
- Array of ordinal numbers. There is one number for each tag level
(starting from level 0). These numbers tell to which appearance of specific
tag key tag belongs to. It is not necessary to provide all tag levels.
XmlUtilException
public static void setSingleAttribute(java.lang.String xmlfile, java.lang.String key, int[] levelNodes, java.lang.String value, java.util.Properties prop) throws XmlUtilException
xmlfile
- full path name of xml file which is about to be read.key
- Full name of tag attribute which is about to be read. The tags in the key
are separated by "/". Name of the attribute is separated by "@" from tag name
(e.g. /doml/database@templateset).levelNodes
- Array of ordinal numbers. There is one number for each tag level
(starting from level 0). These numbers tell to which appearance of specific
tag key tag belongs to. It is not necessary to provide all tag levels.value
- New value of attribute node.prop
- Output properties for xml file.
XmlUtilException
public static int getNumberOfNodes(java.lang.String xmlfile, java.lang.String key, int[] levelNodes) throws XmlUtilException
xmlfile
- full path name of xml file which is about to be read.key
- Full name of tag which is about to be read. The tags in the key are separated by "/"
(e.g. /doml/database).levelNodes
- Array of ordinal numbers. There is one number for each tag level
(starting from level 0). These numbers tell to which appearance of specific
tag key tag belongs to. It is not necessary to provide all tag levels.
XmlUtilException
public static void main(java.lang.String[] args)
|
DODS 6.5 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |