Hello Every one
I am parsing a xml the data is coming from a String. i am using the following code for parsing:-
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory
.newInstance();
DocumentBuilder docBuilder = docBuilderFactory
.newDocumentBuilder();
docBuilder.isValidating();
ByteArrayInputStream ba= new ByteArrayInputStream(connect.content.getBytes("UTF-8"));
doc = docBuilder.parse(ba);
doc.getDocumentElement().normalize();
NodeList locationStatus = doc.getElementsByTagName("street");
for (int i = 0; i < locationStatus.getLength(); i++) {
Node locationValue = locationStatus.item(i).getChildNodes().item(0);
_node.addElement(locationValue.getNodeValue());
}
String [] nodeString = new String[_node.size()];
_node.copyInto(nodeString);
add(new LabelField(nodeString.length+""));
But this code is giving error , i dont no where the error is.
please Help me out
Thanks in advance