Page 1 of 3   1 2 3 > last >>
Bookmark this page: Add Multiple Root Elements in Garmin POIs   is it legal XML  to Yahoo MyWeb Add Multiple Root Elements in Garmin POIs   is it legal XML  to Google Bookmarks Add Multiple Root Elements in Garmin POIs   is it legal XML  to Windows Live Add Multiple Root Elements in Garmin POIs   is it legal XML  to Del.icio.us Digg Multiple Root Elements in Garmin POIs   is it legal XML ! Add Multiple Root Elements in Garmin POIs   is it legal XML  to Netscape
  •  
  • Subject
  • Author
  • Date
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Ramon F Herrera on December 18, 2007, 6:04 pm



I extracted the file 'current.gpx' from my Garmin n=FCvi GPS to take a
look at its contents. See its first lines below.

NetBeans and Eclipse have no problem with it, but when I try to
perform the "View Data Grid" operation in Visual Studio, I get this
message:

"This XML document is not well formed. It contains the following
error: There are multiple root elements".

These are the lines in which it is choking, apparently on
"ele" (elevation)

<wpt lat =3D"10.036995" lon =3D"-69.242541">
<ele>423.583374</ele>
</wpt>

Perhaps the word 'ele' is reserved for element?

-Ramon

<?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"no" ?>
<gpx xmlns=3D"http://www.topografix.com/GPX/1/1"
xmlns:gpxx=3D"http://www.garmin.com/xmlschemas/GpxExtensions/v3"
creator=3D"n=FCvi 660" version=3D"1.1"
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.topografix.com/GPX/1/1
http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/G=
pxExtensions/v3

<metadata>
<link href=3D"http://www.garmin.com">
</link>
<time>2007-12-01T22:59:07Z</time>
</metadata>
[...]


Posted by Phil Hornby on December 18, 2007, 6:53 pm



I extracted the file 'current.gpx' from my Garmin nüvi GPS to take a
look at its contents. See its first lines below.

NetBeans and Eclipse have no problem with it, but when I try to
perform the "View Data Grid" operation in Visual Studio, I get this
message:

"This XML document is not well formed. It contains the following
error: There are multiple root elements".

These are the lines in which it is choking, apparently on
"ele" (elevation)

<wpt lat ="10.036995" lon ="-69.242541">
<ele>423.583374</ele>
</wpt>

Perhaps the word 'ele' is reserved for element?

-Ramon

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1"
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3"
creator="nüvi 660" 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
http://www.garmin.com/xmlschemas/GpxExtensions/v3

<metadata>
<link href="http://www.garmin.com">
</link>
<time>2007-12-01T22:59:07Z</time>
</metadata>
[...]


I reconstitued your file and saved it as a UTF-8 text file from notepad. The
resulting file loads successfully in GeePeeEx Editor (which uses Microsoft's
MSXML-6 parser). It doesn't pass the 'official' test of gpx validity,
(http://www.topografix.com/gpx_validation.asp ), because the schema's
pointing to the wrong place - maybe that's what was upsetting Visual Studio.

--
http://GeePeeEx.googlepages.com

GPX Editor for Garmin Automotive Units




Posted by keshlam-nospam on December 18, 2007, 10:47 pm


Visual Studio is correct. A well-formed XML document may not have more
than one root element; if this file does it may be an XML External
Entity (intended to be embedded into another XML document which will
act as a wrapper) but isn't a well-formed XML document by itself.

Not having seen your entire file, and not knowing anything about this
particular product, I can't comment beyond that.

Posted by keshlam-nospam on December 18, 2007, 10:48 pm


Actually, what the other tools may be doing is taking the first root
element and silently ignoring the later one(s). That's legal, by the
XML Recommendation's rules, but I think warning you that you aren't
getting what you intended probably is preferable.

Posted by Ramon F Herrera on December 20, 2007, 1:19 am


On Dec 18, 11:48 pm, keshlam-nos...@comcast.net wrote:
> Actually, what the other tools may be doing is taking the first root
> element and silently ignoring the later one(s). That's legal, by the
> XML Recommendation's rules, but I think warning you that you aren't
> getting what you intended probably is preferable.

Man, you DO have a blind trust on Microsoft, don't you?

The file has a single root.

Visual Studio displays the file properly and the minus and plus signs
work as expected. I can click on the one and only root, and the whole
tree collapses. It is only when I try to do the conversion to grid
that it fails.

Can a Garmin owner out there verify his/her POIs file, please?

-Ramon


Page 1 of 3   1 2 3 > last >>