Skip site navigation (1) Skip section navigation (2)

Re: help with xpath namespace

From: Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com>
To: Brian Sherwood <bdsher(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: help with xpath namespace
Date: 2011-09-23 16:14:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
2011/9/22 Brian Sherwood <bdsher(at)gmail(dot)com>

> select (xpath('/chassis-inventory/chassis/serial-number/text()',
>        data_xml,
>        ARRAY[ARRAY['junos',
> '']]
>       )) from xml_test;
> Can anyone suggest how I would go about getting the serial-number with
> xpath?
see "mydefns".

This will work:

select xpath(
    ARRAY[ARRAY['junos', ''
from xml_test;

cheers, Filip

In response to


pgsql-sql by date

Next:From: Filip RembiałkowskiDate: 2011-09-23 19:18:09
Subject: Re: a spatial table's bounding box
Previous:From: Thomas KellererDate: 2011-09-23 06:37:05
Subject: Re: using the aggregate function max()

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group