Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: XML Processing
-
Labels:None
-
Environment:windows xp on jdk 1.4.2
-
Number of attachments :
Description
I am trying to use XmlSlurper to process and xml with nested elements with text in them. I need to get the text from just one level at a time but the text() method returns all text for all childrend and I can't see anything that would bring back just the local.
Here is a sample from the console:
groovy> def model = new XmlSlurper().parseText('<aModel><aParent name="bubba">text<aChild>child text</aChild></aParent></aModel>')
groovy> model.aParent[0].text()
groovy>
groovy>
Result: "textchild text"
Activity
Guillaume Laforge
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Paul King [ paulk ] |
Paul King
made changes -
| Assignee | Paul King [ paulk ] | John Wilson [ tug ] |
John Wilson
made changes -
| Issue Type | Bug [ 1 ] | New Feature [ 2 ] |
Paul King
made changes -
| Assignee | John Wilson [ tug ] |