Search Postgresql Archives

Re: XPath question - big trouble

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

 



Thanks for replying.

It was a typo ...
Also id fom example should be objid ...

Anyway, without the typo, the result set is empty.

There is also a weird thing:


SELECT
  xpath_nodeset(rawdata, '/mydocument/body/chapter/contents/paragraph')
FROM xmldocuments

will output

 xpath_nodeset    
 ---------------- 
 (empty line)                 
 (empty line)                 
 (empty line)                 
 (empty line)                 

 4 record(s) selected [Fetch MetaData: 0/ms] [Fetch Data: 1/ms] 

 [Executed: 8/7/06 5:42:54 PM CEST ] [Execution: 3/ms] 

 - (empty line) is what I wrote to say that there was nothing on output - 
which makes me think there is something wrong with XPath implementation.

Anyway, is there a solution to my problems?

Marian

Csaba Nagy wrote:

> [snip]
>>                                 <paragraph id="01"
>>                                 style="para01"></paragraph>
>                                             ^^^^
> [snip]
>>
xpath_bool(rawdata,'/mydocument/body/chapter/contents/paragraph[objid="2_1"]');
>                                                                   ^^^^^
> To me it looks like attribute name mismatch, not to mention you forgot
> the '@' (i.e. I guess you wanted the xpath:
> '/mydocument/body/chapter/contents/paragraph[@id="2_1"]'
> 
> If you were just sloppy writing the email, maybe you should also check
> your actual code for such sloppiness ;-)
> 
> Cheers,
> Csaba.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux