[xml] xpath problem


I'm writing a parser for IEC 61850 xml configuration files.

You can find an example file at:

I wanted to speed up the node searches and passing the xml tree by using xpath.

I've noticed that xpath search (the xmlXPathEvalExpression function)
does not return anything
because of the root node:
<SCL xmlns="http://www.iec.ch/61850/2003/SCL";
xsi:schemaLocation="http://www.iec.ch/61850/2003/SCL SCL.xsd">
but when I remove all the properties of the root node (edited the xml
file) the xmlXPathEvalExpression worked good.

So I thought to remove the root node's properties programmatically by
using the xmlFreePropList but it didn't remove the properties

What am I doing wrong?

You can find my source code at
Basically its a modification of the XPath example from the Libxml
Tutorial written by John Fleck
I also tried to register the namespace, but that didn't help.

TIA, Jovan

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