C
Chris McMahon
Hi...
I cargo-culted the following REXML statement, and it's working fine:
elements = Document.new( my_xml ).elements.to_a( "//*[text()]").map {
|e|
e.text.strip.empty? ? nil : e.text.strip}.compact
but I'm no expert at this. I want for this expression to return an
array containing every element of any given XML Document in a reliable
order. It seems to do so.
Is there any XML with elements that would not be captured by this
expression?
I cargo-culted the following REXML statement, and it's working fine:
elements = Document.new( my_xml ).elements.to_a( "//*[text()]").map {
|e|
e.text.strip.empty? ? nil : e.text.strip}.compact
but I'm no expert at this. I want for this expression to return an
array containing every element of any given XML Document in a reliable
order. It seems to do so.
Is there any XML with elements that would not be captured by this
expression?