Reading an XML file in MapBasic

291 views
Skip to first unread message

Hayden Fisher

unread,
Mar 23, 2009, 4:19:38 AM3/23/09
to mapi...@googlegroups.com

Hi,

 

I’ve created a type of XML file that I’d like to extract map settings from when start-up my mbx program. Has anyone found a way to (just) read this type of data format?

All observations and recommendation are greatly appreciated!

 

Regards Hayden

 

Lars I. Nielsen (GisPro)

unread,
Mar 23, 2009, 4:55:42 AM3/23/09
to mapi...@googlegroups.com
Hi Hayden,

MI Pro/MapBasic 8.5 included a library for handling XML files from MapBasic. I've used it, it woks.

Best regards / Med venlig hilsen
Lars I. Nielsen
GIS & DB Integrator
GisPro


Hayden Fisher skrev:

msydor

unread,
Mar 24, 2009, 6:27:56 PM3/24/09
to MapInfo-L
Lars - Are there XML examples availble online? Haven't found any on
the PBMI website or PDF's.
Michael

On Mar 23, 1:55 am, "Lars I. Nielsen (GisPro)" <L...@gispro.dk> wrote:
> Hi Hayden,
> MI Pro/MapBasic 8.5 included a library for handling XML files from MapBasic. I've used it, it woks.Best regards / Med venlig hilsen Lars I. Nielsen GIS & DB Integrator GisPro

Lars I. Nielsen (GisPro)

unread,
Mar 25, 2009, 3:07:50 AM3/25/09
to mapi...@googlegroups.com
Hi Hayden,

Have a look in the "HTTPlib" folder in Samples/MapBasic. There is an example on how to consume a RSS feed, which includes XML handling.

But the XML library is working much like how MSXML works, it's really more-or-less a standard library that's been opened up for MapBasic usage.


Best regards / Med venlig hilsen
Lars I. Nielsen
GIS & DB Integrator
GisPro


msydor skrev:

Hayden Fisher

unread,
Mar 25, 2009, 3:29:12 AM3/25/09
to mapi...@googlegroups.com

Hi Lars,

 

Thanks, I’m using MapBasic 8 right now, what are the implications if I swap to 8.5 will MapInfo Pro 8 users still be able to use the mbx’s?

 

Regards,

Hayden Fisher

Development and Support

BizeAsset Pty Ltd

sup...@bizeasset.com.au

Mob: (04) 3838 4747

Ph: (07) 3369 2222

Toll Free: 1800 836 850


Uffe Kousgaard

unread,
Mar 25, 2009, 3:59:42 AM3/25/09
to mapi...@googlegroups.com
No. Mbxs that use version 8.5 technology can not be used with MapInfo 8. Please remember an mbx simply calls functionality in mapinfo. The mbx itself don't know what to do with XML or anything else for that matter - it is all just instructions to MapInfo.

Regards
Uffe Kousgaard

Lars I. Nielsen (GisPro)

unread,
Mar 25, 2009, 6:03:40 AM3/25/09
to mapi...@googlegroups.com
Not entirely true, as the XML (and HTTP and FTP) support in 8.5 is based on external DLL libraries.

However, these DLLs are part of the 8.5+ installation, and will not work in pre-8.5 versions.

There is an earlier version of the same XMLlib dll in pre-8.5 installations, but it's not really functional from a MapBasic point of view. I _have_ tried ;-)

So if you're stuck on version 8.0 and cannot upgrade, your only option is to build your own MB callable wrapper for MSXML, or use another XML library entirely (like open sourced Xerces?).



Best regards / Med venlig hilsen
Lars I. Nielsen
GIS & DB Integrator
GisPro


Uffe Kousgaard skrev:

James Moloney

unread,
Feb 10, 2014, 12:56:27 AM2/10/14
to mapi...@googlegroups.com, msy...@parcelinsight.com
Reply all
Reply to author
Forward
0 new messages