# Parse xml through "xml/libxml"

**URL:** <https://www.ruby-forum.com/t/parse-xml-through-xml-libxml/179036>\
**Category:** Rails\
**Created:** [November 16, 2009, 8:55am UTC](https://www.ruby-forum.com/t/parse-xml-through-xml-libxml/179036 "2009-11-16T08:55:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chinna\_gogulapati](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f9ae1b/32.png) [@chinna\_gogulapati](https://www.ruby-forum.com/u/chinna_gogulapati)\
**Post date:** [November 16, 2009, 8:55am UTC](https://www.ruby-forum.com/t/parse-xml-through-xml-libxml/179036/1 "2009-11-16T08:55:21Z")

</div>

Hi All,

Can any one suggest me how to parse following xml in controller, i need  
all the 's for each . I have installed “xml/libxml”  
gem on my installation.

\<soap:Envelope xmlns:soap=“[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)”\>  
soap:Body  
  
  
  
  
.  
.  
.  
.  
.  
  
.  
.  
  
  
\</soap:Body\>  
\</soap:Envelope\>

Thanx in advance  
Chinna.

---

<div class="post-metadata">

**Author:** ![chinna\_gogulapati](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f9ae1b/32.png) [@chinna\_gogulapati](https://www.ruby-forum.com/u/chinna_gogulapati)\
**Post date:** [November 18, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/parse-xml-through-xml-libxml/179036/2 "2009-11-18T19:32:09Z")

</div>

The fastest way for a novice can be to use xpath.

---

<div class="post-metadata">

**Author:** ![chinna\_gogulapati](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f9ae1b/32.png) [@chinna\_gogulapati](https://www.ruby-forum.com/u/chinna_gogulapati)\
**Post date:** [November 18, 2009, 7:40pm UTC](https://www.ruby-forum.com/t/parse-xml-through-xml-libxml/179036/3 "2009-11-18T19:40:06Z")

</div>

Chinna Gogulapati wrote:

> Hi All,
> 
> Can any one suggest me how to parse following xml in controller, i need  
> all the 's for each . I have installed “xml/libxml”  
> gem on my installation.

I think most people these days are using Nokogiri for XML parsing. Take  
a look at it.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
