[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XML attributes



Hi,

1) can you please tell me as to how to get the element tag names and the
attribute tag names with their values .
for  eg if
      <uid loginName="ozone" passwd="ozone" firstName="xyz">
I want to get the attribute tag names "loginName" without hardcoding the tag
name itself as in
 Node _attlist1 = _attr.getNamedItem("loginName"); 
how to use the node interface to get  Attr interface (use getTagName()).

static void list(Node node) {
                
        _name = node.getNodeName();
        NamedNodeMap _attr = node.getAttributes();
  
        // gets the attributes of a Node//
        if (_attr != null){
       
            Node _attlist = _attr.getNamedItem("uid"); //get the uid
attribute
            Node _attlist1 = _attr.getNamedItem("loginName"); // get the
loginName attribute
            Node _attlist2 = _attr.getNamedItem("passwd"); // get the passwd
attribute
            Node _attlist3 = _attr.getNamedItem("firstName"); // get the
firstName attribute
            Node _attlist4 = _attr.getNamedItem("lastName");//get the lastName
attribute
            Node _attlist5 = _attr.getNamedItem("groupIDValue");//get the
groupID attribute
      
	 }     
           
}

2) can you get the ozone server URI address , _userName, _passwd using some
method.
ie ..after RemoteDatabase  database = new RemoteDatabase();
 database.open ("URI", 3333, "_userName", "passwd");
how do we get the parameters (URI,userName,passwd) from the remote database.

reply at the earliest,
Many thanks
bye
prashanth

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1