Best way to strip XML header/tag

I have a very basic web service written in C# that runs some stuff and
spits back in XML a hash that is different depending on what parameters
I send. The format of the return info I am getting looks like this:

<?xml version="1.0" encoding="utf-8" ?>
  <string xmlns="test.webservice.com">STUFF_THAT_I_WANT&#x0;</string>

How do I parse this to only strip out the STUFF_THAT_I_WANT section? Is
this a job for xml-simple? I don't think gsub is the right tool here.
Thanks for any help.

···

--
Posted via http://www.ruby-forum.com/.

Look at nokogiri. This is the best way to do it. This gem will also parse just fragments, and I've found that part to be very helpful in one of my scripts recently.

Wayne

I think Nokogiri is the usual tool to navigate XML and HTML documents.
It should have no trouble extracting the relevant information for you.
http://nokogiri.org/

···

--
Posted via http://www.ruby-forum.com/.