This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes [ajax] extract element from XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "[ajax] extract element from XML" Watch "[ajax] extract element from XML" New topic
Author

[ajax] extract element from XML

wei liu
Ranch Hand

Joined: Nov 19, 2008
Posts: 35

xml Code is :




I was only able to extract the first Criterion block.

what I am using to extract is :


which only prints 1 which should be 2.

can someone tell me how to extract both of the criterion block from the xml code.

thanks


SCJP 1.6 in 2010
SCWCD5 in 2011
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61450
    
  67

wei liu wrote:which only prints 1 which should be 2.

Why would you say that? There is only one Criterions tag in the XML.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
wei liu
Ranch Hand

Joined: Nov 19, 2008
Posts: 35

Bear Bibeault wrote:
wei liu wrote:which only prints 1 which should be 2.

Why would you say that? There is only one Criterions tag in the XML.


You are right, I should use Criterion instead of Criterions. thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [ajax] extract element from XML