<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>There is a small mistake in the SQL I supplied.</p>
    <p>The SQL is more easily accessible on my website at:</p>
    <p><a class="moz-txt-link-freetext" href="https://www.spdba.com.au/processing-gml-data-using-postgresqls-xmltable/">https://www.spdba.com.au/processing-gml-data-using-postgresqls-xmltable/</a></p>
    <p>This is corrected section:</p>
    <p><font face="monospace">SELECT decoded.room_id, <br>
               decoded.capacity, <br>
               decoded.comment,<br>
        <b>       ST_AsEWKT(</b><b><br>
        </b><b>          ST_GeomFromGML(decoded.location::text,4326)</b><b><br>
        </b><b>       ) as geom</b><br>
        FROM<br>
            hoteldata<br>
            cross join<br>
            xmltable(<br>
                '//hotels/hotel/rooms/room'<br>
                passing hotels<br>
                COLUMNS<br>
                    room_id  varchar(3) path '@id',<br>
        <b>            location xml        path 'location/Point',</b><br>
                    capacity integer,<br>
                    comment  text<br>
            ) AS decoded;</font><br>
    </p>
    <br>
  </body>
</html>