I try to use dom parser get value from a xml file like:
InputStream inputStream = new ByteArrayInputStream(
xml_string.getBytes());
Document pdom = pbuilder.parse(inputStream);
Element proot = pdom.getDocumentElement();
NodeList pitems = proot.getElementsByTagName("Profile");
But the pitems size is 0, actually, The code above is working in version before 4.0.
So i hope i can get the the name and ismember item.
Don’t know how to get it now.
Pls help me.
the xml formate:
<Profile parameter="S...J">
<Name>Jon</Name>
<IsMember>true</Ismember>
</Profile>
You need to change your XML like this
and then all other things will work fine