Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 25317B5DBF2 for ; Mon, 19 Sep 2011 13:00:12 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 15398-03 for ; Mon, 19 Sep 2011 16:00:01 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 475ADB5DBC4 for ; Mon, 19 Sep 2011 13:00:01 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id p8JG00If020615 for ; Mon, 19 Sep 2011 13:00:00 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id p8JFllOE097528 for pgsql-sql@postgresql.org; Mon, 19 Sep 2011 12:47:47 -0300 (ADT) (envelope-from news) From: boris X-Newsgroups: pgsql.sql Subject: Re: select xpath ... Date: Mon, 19 Sep 2011 11:49:03 -0400 Organization: Aioe.org NNTP Server Lines: 47 Message-ID: References: <4E775670.9090208@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20110818 Icedove/3.0.11 X-Notice: Filtered by postfilter v. 0.8.2 To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.505 tagged_above=-5 required=5 tests=BAYES_40=-0.001, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/53 X-Sequence-Number: 35853 On 09/19/2011 10:49 AM, Rob Sargent wrote: > Having a name space in the doc requires it's usage in the query. yeah, I got it... I was using wrong one... thanks. > > > On 09/17/2011 11:48 AM, boris wrote: >> hi all, >> I've inserted xml file : >> >> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >> >> zzzzzz >> ...................... >> >> >> to a table: >> >> CREATE TABLE "temp".tempxml >> ( >> record xml >> ) >> >> I can get it using: >> select * from temp.tempxml >> >> >> but, I can't get any values using xpath. ex: >> >> >> select (xpath('/document/title/text()', record ))[1] from temp.tempxml >> >> >> am I doing it right? >> >> thanks. >> >> >> >> >