Skip to Content
0
Dec 01, 2011 at 09:16 AM

get XML node value

109 Views

hi,

recently switch to java .

have a request to get a xml node values here -

I receive a String ojbect that have content like this:

<BookPost createStamp="20111201" fileType="Response" System="osMS" source="sAmazon" targetSystem="osMS" xmlns="http://">

<PostingResults>

<ref>11111</ref>

<error>wrong book isn</error>

</PostingResults>

<PostingResults>

<ref>22222</ref>

<error>wrong book author</error>

</PostingResults>

</BookPost >

I would like to print the value to system.out

<li> 11111 wrong book isn

<li> 22222 wrong book author

any idea how to reach this ? an example will be helped !

thanks a lot.

BenJ