From: Andrew Gibson Date: 2006-06-28T10:06:50+09:00 Subject: REXML and Excel XML :) I set myself the task of being able to parse a random xml file generated by Excel 2003 and I'm having odd problems which I can't really understand. ---- Question Setup ---- Excel defines two element each with their own namespace. I'll paste the XML file at the bottom of this message. ** notice the top two elements: and When those two elements with their namespaces atrributes are present, I can't access any of the lower elements like or , When I manually delete the namespace attributes, everything works fine. In other words: @doc.root.elements.each('Worksheet') {} retruns three elements when I 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? cheers and thanks! :) Andrew ----- Sample Excel file ----- Gibson, Andrew agibson 2006-06-26T12:48:00Z 2006-06-26T12:50:55Z 11.6360 8835 15180 120 105 False False Column1 Column2 Column3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
3 17 4 False False
False False False False
----------------------------------------------- -- Posted via http://www.ruby-forum.com/.