|
No, it would not! You have default namespace defined in the first <EnvioDTE/> node. /EnvioDTE could not match <EnvioDTE xmlns="something">! Please, please, please, read XPath spec about nodes names. And as an illustration see example bellow (not that the only difference between a.xml and b.xml is the default namespace declaration [EMAIL PROTECTED] a]$ diff -u a.xml b.xml --- a.xml 2003-09-24 14:04:16.000000000 -0700 +++ b.xml 2003-09-24 14:04:08.000000000 -0700 @@ -3,7 +3,7 @@ <!ATTLIST SetDTE ID ID #IMPLIED> <!ATTLIST Documento ID ID #IMPLIED> ]> -<EnvioDTE xmlns="http://www.sii.cl/SiiDte" +<EnvioDTE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sii.cl/SiiDte EnvioDTE_v03.xsd" version="0.3"> <SetDTE ID="SetDoc"> <Caratula version="1.0"> [EMAIL PROTECTED] a]$ xmllint --shell a.xml / > xpath /EnvioDTE Object is a Node Set : Set contains 0 nodes: / > [EMAIL PROTECTED] a]$ xmllint --shell b.xml / > xpath /EnvioDTE Object is a Node Set : Set contains 1 nodes: 1 ELEMENT EnvioDTE namespace xsi href="" class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema-instanc">http://www.w3.org/2001/XMLSchema-instanc... ATTRIBUTE schemaLocation TEXT content=http://www.sii.cl/SiiDte EnvioDTE_v03.xs... ATTRIBUTE version TEXT content=0.3 / > Aleksey
|
- [xmlsec] selecting strart node from command line Aleksey Sanin
- RE: [xmlsec] selecting strart node from command li... Jan-Olof Andersson
- Re: [xmlsec] selecting strart node from command li... Aleksey Sanin
- Aleksey Sanin
