Re: [GENERAL] XPath question - big trouble

2006-08-08 Thread Csaba Nagy
> Since you brought up the subject, will this > //[EMAIL PROTECTED] = "02"] > be slower than > /mydocument/body/chapter/contents/[EMAIL PROTECTED] > >> = "02"] > when handling a big document? > I mean from the query time point of view ... I have no idea about the postgres XML implementation int

Re: [GENERAL] XPath question - big trouble

2006-08-07 Thread Marian POPESCU
Thank you! Since you brought up the subject, will this //[EMAIL PROTECTED] = "02"] be slower than /mydocument/body/chapter/contents/[EMAIL PROTECTED] >> = "02"] when handling a big document? I mean from the query time point of view ... Csaba Nagy wrote: > Marian, > >> 1. >> SELECT >>

Re: [GENERAL] XPath question - big trouble

2006-08-07 Thread Csaba Nagy
Marian, > 1. > SELECT > xpath_nodeset(xml_data, '/mydocument/body/chapter/contents/[EMAIL > PROTECTED] > = "02"]|/mydocument/body/[EMAIL PROTECTED]"87"]') > FROM xmltable > WHERE id = 3 You could maybe use the xpath: '//[EMAIL PROTECTED] = "02"]' if you want all paragraphs at all docume

Re: [GENERAL] XPath question - big trouble

2006-08-07 Thread Marian POPESCU
You are right; I had a typo : contents is content Thanks for replying ... Guy Rouillier wrote: > Marian POPESCU wrote: >> There is also a weird thing: >> >> >> SELECT >> xpath_nodeset(rawdata, >> '/mydocument/body/chapter/contents/paragraph') FROM xmldocuments >> >> will output >> >> xpath

Re: [GENERAL] XPath question - big trouble

2006-08-07 Thread Marian POPESCU
It looks that I shoot myself in the foot :( CREATE TABLE xmltable ( id int8 NOT NULL, xml_data text, CONSTRAINT pk_xmltable PRIMARY KEY (id) ) WITHOUT OIDS; The id field contains values from 1 to 3. The field xml_data contains something like this: My document

Re: [GENERAL] XPath question - big trouble

2006-08-07 Thread Csaba Nagy
Marian, On Mon, 2006-08-07 at 17:47, Marian POPESCU wrote: > SELECT > xpath_nodeset(rawdata, '/mydocument/body/chapter/contents/paragraph') > FROM xmldocuments > > will output > > xpath_nodeset > > (empty line) > (empty line) > (emp

Re: [GENERAL] XPath question - big trouble

2006-08-07 Thread Guy Rouillier
Marian POPESCU wrote: > 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

Re: [GENERAL] XPath question - big trouble

2006-08-07 Thread Marian POPESCU
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

Re: [GENERAL] XPath question - big trouble

2006-08-07 Thread Csaba Nagy
[snip] > [snip] > xpath_bool(rawdata,'/mydocument/body/chapter/contents/paragraph[objid="2_1"]'); ^ To me it looks like attribute name mismatch, n