From: matt_neuburg@... (Matt Neuburg) Date: 2009-08-02T00:50:05+09:00 Subject: Re: : Can't find nodes using XPath, namespaces mess Stanislaw Wozniak wrote: > Hi, this was a typo, no semicolon in there: > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="urn:company:platform:foundation:configuration:defn:v1" > xmlns="urn:company:platform:foundation:configuration:defn:v1"> > > > > > > > > > > Then what's the problem? XPath works: s = < END require 'rexml/document' include REXML doc = Document.new(s) p XPath.match(doc, "//treenode['Root']/treenode") #=> [] Oh, wait, you said you were using libxml: s = < xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:company:platform:foundation:configuration:defn:v 1" xmlns="urn:company:platform:foundation:configuration:defn:v1"> END require 'rubygems' require 'xml' doc = XML::Document.string(s) doc.find("//treenode['Root']/treenode").each do |el| p el #=> end Sorry, I'm failing to guess what problem you're having. Perhaps if you showed your actual code? m.