xml, xpath,postgres 9.1
От | caracan |
---|---|
Тема | xml, xpath,postgres 9.1 |
Дата | |
Msg-id | 1327254054743-5164387.post@n5.nabble.com обсуждение исходный текст |
Список | pgsql-general |
Hello everybody, sorry for my english. I need to extract the xml: lat, lon and ele. The xml I have it save on a table (gpx.object_value). For the first two works for me: SELECT (xpath ('//lat ', gpx.object_value)) [i] FROM gpx SELECT (xpath ('//lon ', gpx.object_value)) [i] FROM gpx My question is how do <ele> ? Probe of everything: './trk/trkseg/trkpt/ele/text()' '//ele' '//ele/text()' '//*[//ele]' Please,help me. TKANKS Information: postgres(postgis),eclipse,jsp INSERT INTO gpx(object_name, object_value) VALUES ('t1.gpx', cast(pg_read_file('t1.gpx', 0, 1000000) As xml)); Document xml: - <gpx xmlns="http://www.topografix.com/GPX/1/1" creator="MapMyTracks" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"> - <trk> - <trkseg> - <trkpt lat="12.645648333" lon="-7.884185"> <ele>20.2</ele> <time>2007-12-30T08:27:03Z</time> </trkpt> - <trkpt lat ....... -- View this message in context: http://postgresql.1045698.n5.nabble.com/xml-xpath-postgres-9-1-tp5164387p5164387.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
В списке pgsql-general по дате отправления: