| Author |
obtain property xml
|
Jhonnathan Emilio Cardona Saineda
Greenhorn
Joined: Jan 24, 2012
Posts: 22
|
|
Hi, I have this xml
<test>
<ws>Hello world</ws>
</test>
for obtain the property ws, i use this code.
Document cnf = new Document(new File("file.xml"));
String property = cnf.getElement(new XPath("/test/ws")).getTextString();
How do I get the property if there are 2 tags with the same name? for example:
<test>
<ws>Hello world</ws>
<ws>other Hello world</ws>
</test>
thanks
|
 |
g tsuji
Ranch Hand
Joined: Jan 18, 2011
Posts: 375
|
|
The framework/library in use is curiously left unmentioned here... Here is a plausible code that might just work.
If it does not work to the letter, take it as pseudo-code as the library in use in at everybody's guessing.
|
 |
 |
|
|
subject: obtain property xml
|
|
|