Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 6C50F1337B66 for ; Tue, 12 Oct 2010 04:10:17 -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 78842-06 for ; Tue, 12 Oct 2010 07:10:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com [209.85.216.174]) by mail.postgresql.org (Postfix) with ESMTP id 637261337B53 for ; Tue, 12 Oct 2010 04:10:08 -0300 (ADT) Received: by qyk5 with SMTP id 5so416514qyk.19 for ; Tue, 12 Oct 2010 00:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=QCFTPheHoFiHN0Rbt/k94BSryAGT+MmO8UNWuw0o/RI=; b=MTKysblZGBt/GJ9NUMB5yS1xqPpC6fhpRI9lbTlMPACtRyLfmiSoosvMOIEywFER9L GmTH2jOR8ixTp7FY+Vopv+x7hHyLtcpDgCsXVfwR8Oot11RsWko79RD36cUTyPHPmFCc +y5DxKJRXyE3toXEphLs8Fu9DdzrkXBbq/vRc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=RE/x8l+993i7WCj8B+1qz3ZLVTTioTV7+IyEPxDAq85Hxgmxf98Rdsop5y8fT1zMNs 7fX85e3SY8tlNaqZJwvpGi833BcbWGZgkfd+6PSdGBL7kn0OFtIPcfmLVrnIA2bkfzBV XFNlJZU+3gIsBRMiX/hoLxLMVAii/lGciccsA= MIME-Version: 1.0 Received: by 10.229.189.197 with SMTP id df5mr5931168qcb.223.1286867407118; Tue, 12 Oct 2010 00:10:07 -0700 (PDT) Received: by 10.220.199.140 with HTTP; Tue, 12 Oct 2010 00:10:06 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 Oct 2010 09:10:06 +0200 Message-ID: Subject: Re: get attribute from XML From: =?UTF-8?Q?Viktor_Bojovi=C4=87?= To: Markus Schatten Cc: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=00163630f1abaca38b0492662a2c X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-5 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201010/34 X-Sequence-Number: 34685 --00163630f1abaca38b0492662a2c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear Markus, it works now. Thanx. On Tue, Oct 12, 2010 at 2:22 AM, Markus Schatten wr= ote: > Dear Viktor, > > 'modified' is an attribute node, so you need to use the @ sign to > acquire its value: > > mschatte=3D# select xpath( '//entry/@modified', ' modified=3D"2009-07-07" dataset=3D"S" created=3D"2009-06-16" />' ); > xpath > -------------- > {2009-07-07} > (1 row) > > HTH > > M.S. > > On Tue, Oct 12, 2010 at 1:03 AM, Viktor Bojovi=C4=87 > wrote: > > Hi, > > while parsing this type of XML: > > created=3D"2009-06-16"> > > Q91G55 > > > > i tried this query to get the modified attribute > > select xpath('//entry/modified/text()',xml) from xml_sprot limit 10; > > but it doesn't work. > > So im asking if anyone can help me with that. > > Thanx in advance > > -- > > --------------------------------------- > > Viktor Bojovi=C4=87 > > --------------------------------------- > > Wherever I go, Murphy goes with me > > > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql > --=20 --------------------------------------- Viktor Bojovi=C4=87 --------------------------------------- Wherever I go, Murphy goes with me --00163630f1abaca38b0492662a2c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Dear Markus,
it works now. Thanx.




--
----------------= -----------------------
Viktor Bojovi=C4=87
-------------------------= --------------
Wherever I go, Murphy goes with me
--00163630f1abaca38b0492662a2c--