Re: [xml] xpath problem
- From: Jovan Kostovski <chombium gmail com>
- To: Belgabor <belgabor gmx de>
- Cc: xml gnome org
- Subject: Re: [xml] xpath problem
- Date: Fri, 6 Mar 2009 18:07:10 +0100
On Wed, Mar 4, 2009 at 2:47 AM, Belgabor <belgabor gmx de> wrote:
Sounds very much like a namespace issue. Please tell exactly how you
registered it and what query you then used.
Hi,
I've changed the code a bit and the xpath expressions:
xmlDocPtr doc;
xmlXPathContextPtr context;
xmlChar *xpath;
xmlXPathObjectPtr result;
doc = xmlParseFile("prot.icd");
context = xmlXPathNewContext(doc);
xmlXPathRegisterNs(context,"ied","http://www.iec.ch/61850/2003/SCL");
result = xmlXPathEvalExpression(xpath, context);
The expressions are:
/icd:SCL
//icd:LN[ desc="PEFN"]
These expressions evaluate good but I don't know how to write and
expression which uses absolute path
and evaluate in the given namespace or even better if I can move the
starting point of the evaluated expression in the xpath context.
Is there a way to set the starting point (the starting node) from
where the xpath will be evaluated if
relative paths are used?
TIA, Jovan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]