views:

54

answers:

1

Dear All:

I would like to get a Groovy NodeChild that represents, e.g., a body tag.

However, if I do

html=new XmlSlurper().parseText(blah)

I get html which is a NodeChild.

However html.body is a NodeChildren tag, and I can't seem to get a NodeChild.

Much help appreciated!

Thank you Misha

A: 

This works but there must be something simpler:

def body=html.children().find { it.name()=="BODY" }

Misha

Misha Koshelev