BAM! :) thanks, I never noticed that. Is that an XML standard thing? if 
you have a default namespace, you define it twice? once with no prefix 
and again with the prefix you'll need to access it?



Bob Hutchison wrote:
> Hi,
> 
> On Jun 27, 2006, at 9:06 PM, Andrew Gibson wrote:
> 
>> ** notice the top two elements: <DocumentPorperties> and  
>> remove the namespace attribute, but nothing when I put it back in.
>>
>> ---- Actual Question ---
>> Is this just a weird instance of XML which REXML doesn't support or  
>> do I
>> need to be doing some fancy XPath footwork to make it work?
> 
> XPath footwork. Write:
> 
> @doc.root.elements.each('ss:Worksheet') {}
> 
> The prefix 'ss' is defined and equal to the default namespace of the
> Worksheet element.
> 
> Cheers,
> Bob
> 
>>
>> cheers and thanks! :)
>>
>> Andrew
>>
> 
> ----
> Bob Hutchison                  -- blogs at <http://www.recursive.ca/
> hutch/>
> Recursive Design Inc.          -- <http://www.recursive.ca/>
> Raconteur                      -- <http://www.raconteur.info/>
> xampl for Ruby                 -- <http://rubyforge.org/projects/xampl/>


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