Thu Oct 23, 2008 4:16 pm
<?xml version="1.0" encoding="UTF-8"?>
<request create-oids="true" type="update"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="PortalConfig_1.2.xsd">
<portal action="locate">
<user action="update" firstname="WK0" lastname="PortalAdmin"
name="uid=wk0portaladmin,o=Default Organization" password="password">
</user>
</portal action>
Thu Oct 23, 2008 4:19 pm
private void getXmlElemStr(org.w3c.dom.Node xmlElem) {
NamedNodeMap elemAttr = null;
NodeList elemKids = null;
System.out.println("node with name is " + xmlElem.getNodeName());
if (xmlElem.getNodeType() == Node.ELEMENT_NODE) {
elemAttr = xmlElem.getAttributes();
if (elemAttr != null) {
System.out.println("elem attr size = " + elemAttr.getLength());
Node attrEl = null;
for (int i = 0; i < elemAttr.getLength(); i++) {
attrEl = elemAttr.item(i);
System.out.println("attrEl name=" + attrEl.getNodeName() + "
value = " + attrEl.getNodeValue());
}
}
elemKids = xmlElem.getChildNodes();
Node elNode = null;
for (int i = 0; i < elemKids.getLength(); i++) {
elNode = elemKids.item(i);
if (elNode.getNodeType() == Node.ELEMENT_NODE) {
System.out.println("node " + i + " of type:" +
elNode.getNodeType() + " with name is " + elNode.getNodeName());
this.constructXmlElemStr(elNode);
}
}
String elemValue = xmlElem.getNodeValue();
}
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.