Questions tagged [xmlslurper]

XMLSlurper is a Groovy class that makes parsing and working with XML simpler than with Java.

You can read more here

241 questions
0
votes
1 answer

Lookahead in groovy when parsing xml?

I'm trying to parse an xml-tree. I want to: Print a representation of the path to each item. Is there a smarter way to create the path? Print the name and value of nodes with primaryType="content" (content-nodes) Found a smarter/better approach.…
C-B
  • 33
  • 5
0
votes
1 answer

Retrieve top level XML node name with XmlSlurper

Given the following XML how can I obtain the value of status with Groovy's XmlSlurper: 21 Jane McCoy
Sam Farmer
  • 4,108
  • 17
  • 20
0
votes
1 answer

Groovy: Navigating a empty xml

Reading xml from flat file and parsing it using XmlSlurper. Here is how XML file look like
Himanshu Yadav
  • 13,315
  • 46
  • 162
  • 291
0
votes
1 answer

How to display EVERYTHING in an html element using XmlSlurper in GRAILS

Lets say I have an xml file called pixelsTest.xml that looks like this...
Eli Davila
  • 577
  • 2
  • 6
  • 14
0
votes
1 answer

Parse Xml tags with attributes

I have this xml : nl Text fr Text en Text
ErEcTuS
  • 777
  • 1
  • 14
  • 33
0
votes
1 answer

Getting count for each duplicate entry in XML using xmlSlurper

I have to count the appearance of each invalid number (BTNumber) appeared in XML. I am using groovy XmlSlurper() .Please suggest how to count the number and count (as many times it is in xml) for example- BTNumber | count …
sana
  • 460
  • 1
  • 10
  • 25
0
votes
1 answer

Delete part of xml using groovy with xml sluper

Iam new to groovy ,so as a part of my task i need to update xml . My xml is ::
HseJaR
  • 31
  • 9
0
votes
1 answer

XmlSlurper parsing a query result

I have a query that bring back a cell in my table the has all xml in it. I have it so I can spit out what is in the cell without any delimiters. Now i need to actually take each individual element and link them with my object. Is there any easy way…
CoffeePeddlerIntern
  • 659
  • 3
  • 13
  • 29
0
votes
1 answer

I'm trying to loop over a XMLSlurper find statement using a list array. Can you do this?

I'm trying to loop over an expression like this changing the string 'question-hyperlink' to an item in a list I'm new to groovy and can't find a way that works. Do you really have to hard code this ? Every example I can find is hardcoded .find{…
user1741202
  • 121
  • 1
  • 1
  • 6
0
votes
0 answers

Confluence plugin not able to find .dtd file

I am writing a plugin for our companys Confluence. In this plugin i need to parse some Confluence Storage Format XML. Therefor i got the confluence.dtd and some .ent Files from here: http://www.amnet.net.au/~ghannington/confluence/readme.html I put…
nurgan
  • 309
  • 1
  • 4
  • 22
0
votes
1 answer

Selecting using XmlSlurper like a WHERE clause

Given the following HTML snippet, I need to extract the text of the content attribute for the meta tag with attribute name equal to description and the meta tag with attribute property equal to og:title. I've tried what is shown at Groovy: Correct…
Lee Grey
  • 303
  • 1
  • 5
  • 16
-1
votes
1 answer

XMLSlurper inside Groovy Script Not Working for a simple XML

I am trying to parse an XML using Groovy Script's XMLSlurper plugin. I need to read the value in d:editStatus element. import groovy.xml.*; def myxml = '' + '
Sourav Das
  • 982
  • 1
  • 15
  • 40
-1
votes
1 answer

Groovy XMLParser & XMLSlurper

I am working on a groovy xml exercise & as per the problem, i need to write 2 methods: readFileContent(fileName) - This method is used to read the content from file(xml file) and return that file's content as string. loadStudents(xmlString) - This…
vinayP
  • 3
  • 3
-1
votes
2 answers

Copying directory using Groovy & XMLSulrper data

Please help, so I'll avoid tearing my hair out ... I need to simple Copy folderA to FolderB using a groovy that gets the data from an XML. I have to use XMLSlurper or XMLParser This is it - println "Start" def Folders = new XmlSlurper().parse(new…
Elyahu
  • 226
  • 1
  • 2
  • 15
-1
votes
1 answer

NoRouteToHostException using XmlSlurper in Groovy

I am trying to parse an XML file using XmlSlurper. I have the following code: import groovy.util.XmlSlurper def newIssue = new XmlSlurper().parse(new File("1234-export.xml")) Running this gets me: java.net.NoRouteToHostException: No route to…
Jess
  • 217
  • 1
  • 3
  • 14
1 2 3
16
17