Methods in XML--pL help
I have string...as
String xstr="<?xml version=\"1.0\"?>\n"+
"<UserGroups>\n<u_bit><![CDATA[1]]></u_bit>\n"+
"<u_title><![CDATA[public]]></u_title>\n<u_description><![CDATA[Pages are available to all visitors - no restrictions are applied]]></u_description>\n"+
"<u_used><![CDATA[1]]></u_used>\n<u_fromname/>\n<u_fromemail/>\n<pw_email/>\n<u_user/>\n<u_password/>\n</UserGroups>"+
"";
I am trying to form a xmlDoc using String Reader as follows..
java.io.Reader reader = new java.io.StringReader(xstr);
org.xml.sax.InputSource source = new org.xml.sax.InputSource(reader);
org.w3c.dom.Document xmlDoc=null;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
xmlDoc = builder.parse(source);
Element xmlRoot=xmlDoc.getDocumentElement();
Table_Name=xmlRoot.getNodeName();
NodeList oNodeList = xmlRoot.getChildNodes();
Node PNode=oNodeList.item(0);
But at the end...ONodeList.item(0)...does not give anything...Am I doing anything wrong...Pl help if possible soon
smita

