REXML is a conformant XML processor for the Ruby programming language. REXML is included in the standard library of Ruby.
Questions tagged [rexml]
124 questions
1
vote
3 answers
REXML parsing an XML in ruby
Folks,
I am using REXML for a sample XML file:
user1047912
1
vote
2 answers
Ruby REXML: Get Value Of An XML Element
I am trying to put the values of some xml elements into an array using rexml. Here is an example of what I am doing:
doc = Document.new("This is one title This is another title ")
XPath.each( doc, "*/title")…

Jarred
- 1,986
- 5
- 27
- 42
1
vote
1 answer
Preserving DOCTYPE declaration with REXML
I'm trying to parse a log4j.xml file, edit some attributes, and write it back.
The log4j.xml has the declaration, but when I write it back, the declaration changed to .
I've opened…

urbo83
- 13
- 3
1
vote
1 answer
ruby rexml get element child
I need to parse a xml document in ruby, using rexml, that has the following structure:
Best NYC New Year's Party
Come spend New Year's Eve with us!
…

Alina Danila
- 1,683
- 1
- 24
- 60
1
vote
1 answer
REXML - Having trouble asserting a value is present in XML response
I got help here this morning using REXML and the answer helped me understand more about it. However I've encountered another problem and can't seem to figure it out.
My response is like this:

Adrian
- 143
- 1
- 4
- 13
1
vote
3 answers
REXML: Equivalent of javascript-DOM's .innerHTML=
Is there a way to pass a string to an REXML::Element in such a way that the string will be parsed as XML, and the elements so found inserted into the target?

rampion
- 87,131
- 49
- 199
- 315
1
vote
1 answer
Ruby XML syntax error
I am trying to evaluate 4 XML files that I create from a mysql database, I want to output the text of those XML field as a pairs of data so I can create a hash. (Ex: "Total Builds, 359") I am pretty sure I am getting a syntax error because of the…

Hunter McMillen
- 59,865
- 24
- 119
- 170
1
vote
2 answers
Ruby REXML confusion
Hi I am trying to parse data out of an XML file I exported from mysql command line tool. I am following a tutorial located here: http://www.germane-software.com/software/rexml/docs/tutorial.html to extract the data I want which is what is in the …

Hunter McMillen
- 59,865
- 24
- 119
- 170
1
vote
2 answers
1
vote
1 answer
Add XML namespace to existing document in ruby
I need to add an element to an existing XML document which uses a namespace that doesn't exist in the original. How do I do this?
Ideally I would like to use REXML for portability, but any common XML library would be okay. An ideal solution would be…

Joseph Holsten
- 20,672
- 6
- 25
- 29
1
vote
1 answer
Ruby RSS -- Private method send called for RSS:REXMLListener
I am trying to integrate a RSS parser into my IRC bot, and i've found some simple code to do so online, however, if i put this code in the bot, I get this:
Error: private method `send' called for #
I'm not sure why it…

umby24
- 11
- 2
1
vote
0 answers
Chef : NameError : Uninitialized constant curstom resource
error
Can someone tell me what can be the causes of this error. Does this mean it needs initialization before actually using it? My resource uses REXML::Element where it is throwing error, although the values have been supplied it is throwing…

sandy
- 11
- 2
1
vote
1 answer
Parse xml file with rails REXML?
How can i parse this xml file ?
−
table_1
2
0.02
−
table_2

krunal shah
- 16,089
- 25
- 97
- 143
1
vote
1 answer
Parse REXML Document, ignoring whitespace
Should REXML ignore identation or whitespacing?
I am debugging an issue with a simple HTML to Markdown convertor. For some reason it fails on
But not onfoo
The reason is,…foo

berkes
- 26,996
- 27
- 115
- 206
1
vote
4 answers
REXML fails to select from attribute. Bug or incorrect XPath?
I try to select an element from an SVG document by a special attribute.
I set up a simple example.

Pascal
- 2,197
- 3
- 24
- 34