On 6/2/2010 12:25 PM, Er. syed imran ali wrote:
entBuilder db = dbf.newDocumentBuilder();
                        doc = db.parse(in);
NodeList nodes = doc.getElementsByTagName("Member");
  if(nodes.getLength()>  0){

                            for (int i = 0; i<  nodes.getLength(); i++) {
                                
Hey buddy,
For XML Parsing use Pull Parser instead of DOM Parsing.
A DOM parser works by parsing a XML file into a native data structure matching the hierarchy of the XML file and the entire file is looked up so it uses more memory while a pull parser works by creating a loop that continually requests the next event and can then handle that event directly within the loop. The best part of the pull parser is that it can easily be stopped at any point. only do processing on demand and remove the overhead of extra method calls and classes.

--
Technology never Ends, Learn Fast...

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to