XPath in Android

Put your problem here if it does not fit any of the other categories.

XPath in Android

Postby cattivik » Mon Dec 15, 2008 7:12 pm

It is possible to use XPATH in Android?

I want to find and extract a node by id atribute in a xml file. It is possible?

For example:

my method:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public Node getNode(String id){...}
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <myxml>
  2.  
  3. <mynode id="pippo">ciao</mynode>
  4.  
  5. <mynode id="pluto">ciao</mynode>
  6.  
  7. <mynode id="paperino">ciao</mynode>
  8.  
  9. </myxml>
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


If I use getNode(pluto)
I want to return <mynode id="pluto">ciao</mynode>

Help me please!!
Thanks
cattivik
Freshman
Freshman
 
Posts: 5
Joined: Fri Sep 26, 2008 10:04 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 15 guests