[xml] XPath evaluation
- From: "CAPRON Patrick" <capronpa e-i com>
- To: <xml gnome org>
- Cc: AUFFRAY Gilles <auffragi e-i com>
- Subject: [xml] XPath evaluation
- Date: Wed, 26 Apr 2006 14:39:44 +0200
Hi,
I don't understand
how libxml2 is evaluating some expressions.
I have an XML who
looks like :
<?xml version="1.0"?>
<REQUEST>
<HEADER/>
<CODEAPPLI>TARGET2</CODEAPPLI>
<BICCOR>CMCIFRPP</BICCOR>
<NMSRVLOG>NMSRVLOG</NMSRVLOG>
<NMRQTLOG>NMRQTLOG</NMRQTLOG>
<REQUESTREF>REQUESTREF</REQUESTREF>
<RQTSTATUS>RQTSTATUS</RQTSTATUS>
<SwInt:RequestPayload>
<AppHdr
xmlns="urn:ssp.ApplicationHeader$ahV10">
<From>
<Type>NAME</Type>
<Id>PM</Id>
</From>
<To>
<Type>NAME</Type>
<Id>PM</Id>
</To>
<MsgRef>ABCDEF</MsgRef>
<CrDate>2006-04-19T12:00:00</CrDate>
</AppHdr>
<Document
xmlns="urn:ssp.pm.GetLimit$camt.009.001.02">
<camt.009.001.02>
<MsgId>
<Id>REFERENCE12345</Id>
</MsgId>
<LmtQryDef>
<LmtCrit>
<NewCrit>
<SchCrit>
<AcctOwnr>CMCIFRPAXXX</AcctOwnr>
</SchCrit>
</NewCrit>
</LmtCrit>
</LmtQryDef>
</camt.009.001.02>
</Document>
</SwInt:RequestPayload>
</REQUEST>
I use the
xmlXPathEvalExpression function.
If I use the
_expression_ : /REQUEST/RequestPayload/Document the
function returns 0 node.
If I use the
_expression_ : /REQUEST/RequestPayload/*[name()='Document'] it returns the
node I'm looking for.
Could anybody
explain me why there is a difference between this two expressions
?
I believed that they
were the same...
Is it because of the
xmlns ?
Thanks,
Patrick CAPRON
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]