axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Park" <Henry.P...@isd.lacounty.gov>
Subject parsing xml in MessageElement
Date Mon, 14 Jan 2008 22:06:26 GMT
How can I modify the following code to display every attribute in the
xml file?  For example, in addition to "givenname", I have phonenumber,
email, etc.  How can I display all of those fields in a single loop?

 

MessageElement[] messageElements = testa.get_any();

SOAPElement test1 = messageElements[1];

NodeList nl2 = test1.getElementsByTagName("givenname"); 

for (int x = 0; x < nl2.getLength(); x++) {

  if (nl2.item(x) != null) {

    System.out.println(nl2.item(x));

  }

}


Mime
View raw message