Virgil,

The problem lies in the following line:

        response.write("<marker>")

The "marker" tag should not be closed (with a ">") before you write the 
attributes. Try something like this instead:

        while (not oRS.EOF)
                response.write("<marker ")
                        write attributes here...
                response.write(" />")                   
                oRS.MoveNext()
        wend

Still not nearly fool proof, but better. The attribute values (i.e. the data 
coming from oRS("svclatitude")) should also be enclosed in quotation marks ("). 
The result on your webpage is not XML the way most people do it, and while it 
might work, I wouldn't count on it continuing to do so.

The XML DOM object that was mentioned earlier might be a bit harder to 
understand at first, but it will make your (XML related) life a lot easier when 
you do.

Eyvind.

-----Opprinnelig melding-----
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne av Virgil Bierschwale
Sendt: 30. mai 2007 16:37
Til: 'ProFox Email List'
Emne: RE: VFP to XML

Agreed..
Problem was the example I sent was just that as I was in the process of
making it work.

The actual code is listed here.
You can see it in action by clicking here -->
http://www.virgilslist.com/get1059.asp


        qry = "SELECT svclatitude, svclongitude, svcrate + ' ' +
svcfirstname + ' ' + svclastname AS htmldesc, svcrate + ' ' + svclastname AS
labeldesc, 'enlisted' as titledesc from Roster WHERE svcBranch = 'NAVY' "
        Set oRS = oConn.Execute(qry)

        oRS.MoveFirst()

        response.write("<?xml version='1.0' encoding='ISO-8859-1'?>")
        response.write("<markers>")
        while (not oRS.EOF)
                response.write("<marker>")
                response.write("lat=" & oRS("svclatitude") & " ")
                response.write("lng=" & oRS("svclongitude") & " ")
                response.write("html=" & oRS("htmldesc") & " ")
                response.write("label=" & oRS("labeldesc") & " ")

                response.write("title=" & oRS("titledesc") & " ")       
                response.write("</marker>")                     
                oRS.MoveNext()
        wend

        oRS.close()
        oConn.close()
        response.write("</markers>")

Virgil Bierschwale
http://www.bierschwale.com
http://www.bierschwalesolutions.com


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Eyvind Axelsen
Sent: Wednesday, May 30, 2007 9:34 AM
To: ProFox Email List
Subject: RE: VFP to XML

Virgil,

PMFJI, but it seems to me that you should indeed change the code you use to
produce your XML. I looked at an example from the site you mentioned, and
the xml looks like this:

<markers>
<marker lat="43.65654" lng="-79.90138" html="Some stuff to display in
the&lt;br&gt;First Info Window"  label="Marker One" />
<marker lat="43.91892" lng="-78.89231" html="Some stuff to display in
the&lt;br&gt;Second Info Window" label="Marker Two" />
<marker lat="43.82589" lng="-79.10040" html="Some stuff to display in
the&lt;br&gt;Third Info Window"  label="Marker Three" />
</markers>

Your code, however, would as far as I can tell produce something like this:

<markers>
<marker> lat="43.65654" lng="-79.90138" html="Some stuff to display in
the&lt;br&gt;First Info Window"  label="Marker One" </marker>
<marker> lat="43.91892" lng="-78.89231" html="Some stuff to display in
the&lt;br&gt;Second Info Window" label="Marker Two" </marker>
<marker> lat="43.82589" lng="-79.10040" html="Some stuff to display in
the&lt;br&gt;Third Info Window"  label="Marker Three" </marker>
</markers>

The difference is, as you no doubt can tell, that in the first example the
lat, lng etc are attributes of the marker tag, while in your code they would
be just text enclosed by the tag. Also, the problem with quotes inside the
attribute values is a valid concern.

Regards,

Eyvind.


-----Opprinnelig melding-----
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne av
Virgil Bierschwale
Sendt: 30. mai 2007 13:37
Til: 'ProFox Email List'
Emne: RE: VFP to XML

Yep, I've tried it and I use it.
Yep, the place that I found all info at is located at
http://www.econym.demon.co.uk/googlemaps/index.htm

I'm not going to go tit for tat with you, but I've been in this business
quite a long time and one thing that I've learned is that there are a lot of
different ways to accomplish the same thing.

In other words, there is no right nor wrong way to develop software and to
insinuate that only your way is "the way" is beyond belief <grin>

As for my financial situation, I currently work at 3 jobs, some paid and
some unpaid.

I too used to be an arrogant sob making 67.50 per hour as an contractor
working 60 plus hour weeks until the work went overseas and I couldn't find
anymore.

It has humbled me a bit.

Lets hope that it doesn't happen to you.

Virgil Bierschwale
http://www.bierschwale.com
http://www.bierschwalesolutions.com


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Derek Kalweit
Sent: Tuesday, May 29, 2007 9:38 AM
To: ProFox Email List
Subject: Re: VFP to XML

> As for this not working, have you tried it ?
> I'm sure that you will find that it creates the xml file that google map
> needs exactly and with minor modification, it will create other xml files.

Have **you** tried it? The code you posted creates <marker></marker>
elements with text inside it, instead of the xml attributes that
Google Maps(and generally XML-enabled applications) utilize. No, I
haven't loaded this into Google Maps itself(I don't have your data
source to test if I chose to waste my time doing so), but if it works,
it's a bug/undocumented 'feature' in Google Maps and you can't expect
it to keep working.


> I just believe in learning from others mistakes instead of trying to
> reinvent the wheel every time.

Writing a text file like this is not the generally-accepted best way
to write XML files, generally. The more accepted way is a DOM-based
XML parser, such as MSXML. Occasionally writing to the text file
directly such as you do is useful if you have very large files, but
IMO, those aren't a good candidate for xml in the first place. Not all
XML files are as primitive as the one you have-- many are multiple
levels deep.


I'm sorry to hear about your financial woes. Possibly it would be
smarter for your financial situation to find a job(any job) to pay
some bills instead of doing websites for non-profits, etc.?


-- 
Derek


[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to