Re: [xml] XPath question

Erik F. Andersen wrote:

I use LibXML version 2.6.17 on Windows and I have a problem with an XML document where I cannot get XPath to 
return any nodes.

The start of the XML looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<DenDynamiskeBlanket xmlns="";

My problem is that no matter what I do I cannot locate any nodes with XPath. I tried registering the 
namespace using xmlXPathRegisterNs (the prefix is nil). Is there a problem with the XML above or am I doing 
something wrong?  If I remove the xmlns attribute I have no problems. I think the XML is wrong but I don't 
know what it is...
Are you using the registered prefix in your query?
i.e. //nil:Form should return all the Form element nodes (assuming you registered ""; with the prefix "nil")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]