Page 1 of 2   1 2 > last >>
Bookmark this page: Add Help creating  gpx file to Yahoo MyWeb Add Help creating  gpx file to Google Bookmarks Add Help creating  gpx file to Windows Live Add Help creating  gpx file to Del.icio.us Digg Help creating  gpx file! Add Help creating  gpx file to Netscape
  •  
  • Subject
  • Author
  • Date
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Brian on July 12, 2007, 10:09 pm


I have a Microsoft Access database that holds my addresses. I wrote some
VBA code to convert the addresses into waypoints that are written to a .gpx
file.

In my <desc> ... </desc> element I would like to have multiline information.
How to I indicate a new line?

I tried Chr(13)+Chr(10), Chr(13) alone, and Chr(10) alone. Each of these
will give me a new line, but a small diamond appears at the end of each
line, too. I don't want the small diamond.

I tried using <br>, but the POI Loader said that the resultant file was
corrupt.

--
-Brian
Garmin StreetPilot c320



Posted by Christian Barmala on July 13, 2007, 1:41 am


Hi Brian,

Brian wrote:
> In my <desc> ... </desc> element I would like to have multiline information.
How to I indicate a new line? I tried using <br>, but the POI Loader said that
the resultant file was corrupt.

Did you try

<desc>
<![CDATA[
This is line 1 of the multiline information,<br>
and this is line 2.
]]>
</desc>

or

<desc>
This is line 1 of the multiline information,&lt;br&gt;
and this is line 2.
</desc>

Christian

Posted by Gilles Kohl on July 13, 2007, 1:48 am


On Fri, 13 Jul 2007 02:09:41 GMT, "Brian"

>I have a Microsoft Access database that holds my addresses. I wrote some
>VBA code to convert the addresses into waypoints that are written to a .gpx
>file.
>In my <desc> ... </desc> element I would like to have multiline information.
>How to I indicate a new line?
>I tried Chr(13)+Chr(10), Chr(13) alone, and Chr(10) alone. Each of these
>will give me a new line, but a small diamond appears at the end of each
>line, too. I don't want the small diamond.

Hmm, are you sure you tried all those combinations, that is, did you
peek at the generated GPX file with a hex editor (e.g. UltraEdit) and
check that the line terminators were what they were intended to be?

The small diamond seems to indicate an additional character before the
line terminator that the GPS doesn't like/cannot interpret.

>I tried using <br>, but the POI Loader said that the resultant file was
>corrupt.

I guess you cannot use HTML within XML without escaping it. OTOH I
doubt a GPS unit will have HTML smarts built-in here. You could try
using "&lt;br;&gt;" instead of "<br>" or maybe try enclosing your text
in CDATA like so:

<desc><![CDATA[
first line
second line
]]></desc>

Regards,
Gilles.


Posted by Simon Slavin on July 15, 2007, 6:36 pm


On 13/07/2007, Gilles Kohl wrote in message

>
> >I tried using <br>, but the POI Loader said that the resultant file was
> >corrupt.
>
> I guess you cannot use HTML within XML without escaping it.

And that's exactly the problem. You can. In fact I just today discovered
this bug in POI Loader since someone reported it to me as a bug in /my/
GPS software. And of course my software doesn't have bugs.

First there's a minor change to what Brian tried. '<br>' is not legal
XML, since XML uses balanced tags. The correct way to write it would be
'<br />' or '<br></br>'. I've never seen the second variation on this
used. So Brian should have tried '<br />' and it should have worked.

Then there's the problem that it didn't work. I have to say I think
that's a problem with Garmin's software. The break tag is completely
legal XML. At worst, POI Loader should include those characters in the
resulting .gpi file. At best, it should interpret them properly as a
break. I think that's a bug. Sorry.

Simon.
--
http://www.hearsay.demon.co.uk

Posted by Colin Wilson on July 13, 2007, 3:03 am


> I have a Microsoft Access database that holds my addresses. I wrote some
> VBA code to convert the addresses into waypoints that are written to a .gpx
> file.
> In my <desc> ... </desc> element I would like to have multiline information.
> How to I indicate a new line?
> I tried Chr(13)+Chr(10), Chr(13) alone, and Chr(10) alone. Each of these
> will give me a new line, but a small diamond appears at the end of each
> line, too. I don't want the small diamond.

Try opening a working gpx file in a hex editor to see what the correct
format should be - then simply insert that character.

I suspect the diamond is simply a function of whatever app it is
you're using to "view" that character (i've seen this happen in excel)

Page 1 of 2   1 2 > last >>