Search Postgresql Archives

Re: xpath functionerror

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

 



sparikh wrote
> Thanks David for your quick response. My original objective was to get the
> value of a particular node in xml which is stored as text datatype in the
> table.
> 
> For example :
> 
> 
> <?xml version="1.0"?>
> -
> <settings>
> -
> <F999>
> <amperage>
> 16
> </amperage>
> <amperagesteps/>
> </F9999>
> </settings>
> I want to extract the value of amperage as '16'. Like that I may have many
> nodes in xml want to get the report to show them in different columns. I
> used to do this with oracle using xml functions provided.
> 
> Trying to figure out same in postgres.
> 
> Thanks again for your help.

And the same goes for PostgreSQL but you need to use the correct data types;
xml functions operate on XML instead of TEXT because that way they don't
really need to deal with bad text input - the type conversion function takes
care of making sure the text is valid XML.

David J.





--
View this message in context: http://postgresql.1045698.n5.nabble.com/xpath-functionerror-tp5793724p5793742.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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