Q:

android getElementsByTagName returns empty list

I have found what I think is peculiar behavior in Android 3.x (Gingerbread) for the Android tablet.  I have been able to recreate the issue on the Galaxy tab and on the emulator.
Other versions of the OS running the EXACT code work fine.  Here's the detail:
Document dom = db.parse(new InputSource(new StringReader(response)));
Element root = dom.getDocumentElement();
NodeList items = root.getElementsByTagName("root");  // this is the     org.w3c.dom.Element.getElementsByTagName

items.getLength()  >>>> is Always 0 on Android 3.x

But the expected list count on all other versions 2.1 and higher (obviously excluding 3.x versions) is returned.
The xml that is being parsed is:  

verbatim!  Again, same exact source code works fine on Android versions 2.1, 2.2, 2.3 and 4.0 but NOT versions 3.0 or 3.1  
Any suggestions, explanations or resolutions would are all very much appreciated!  

A:

No one - really!
I have found a consistent methodology that works for all versions of Android.  One caveat, it requires you to develop your own xpath class:
http://developer.android.com/reference/org/xmlpull/v1/XmlPullParserFactory.html
I will continue to look for an xpath solution that works for all versions of the Android OS.  If I find it, I will update this thread.
Cheers
Android Addict

