← Back to team overview

maria-discuss team mailing list archive

Connect engine assistance needed with nested first node in XML



I'm trying to parse GPX files, which are XML with the connect engine.
They look like this:

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="runtastic - makes sports funtastic,
        <trkpt lon="-0.7057708501815800" lat="51.4470825195312003">
        <trkpt lon="-0.7059442996978760" lat="51.4470443725586009">
        <trkpt lon="-0.7059520483016970" lat="51.4470558166503977">

Once I have the Connect -engine enabled I do the following:

create table GPXSource (
   lat char(20) field_format='@',
   lon char(20) field_format='@')
   engine=CONNECT table_type=XML

It doesn't work, I cannot figure out how to tell the Connect engine
that the data I'm interested is beneath the gpx/trk/trkseg -node
(tabname). If I remove the trk and trkseg -nodes from the data and
just have the gpx -node left and all trkpt -nodes inside it everything
works perfectly. Any help is appriciated.



Rasmus Johansson, VP Engineering
MariaDB | t: +358 50 499 9589 | Skype: ratzpo

Follow ups