Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / February 2004



Tip: Looking for answers? Try searching our database.

XML Parser

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Micah Koch - 19 Feb 2004 04:36 GMT
I'm getting tired of the corruption problems with my binary data files
and would like to convert my data files to be stored in XML format.  At
least that way if someone goes wrong the file is at least human readable
and stands some chance of being able to be fixed without too much pain.  
It would also provide a better mechanism for any 3rd party apps that
want to use the data in my data files.  Anyways, I was taking a look at
the XML parsers out there.  I wasn't able to find an existing prebuilt
lib of any of the common ones(expat, Xerces, libxml) for Classic and
Carbon, which is what I need.  So does anyone know of any such resource?

Barring an existing lib, I'll try to get one of these guys built myself.  
Expat seems like it might be the simplest of them all to get built just
based on a quick glance at the different sources.  Anyone have any
experience or advice about which XML parser they like best?

Ideally once I get one of those guys going I'd like to build something
like Arabica(http://www.jezuk.co.uk/cgi-bin/view/arabica/roadmap) on top
of it to give me a nice SAX API.  Arabica was just what I first came
across, I don't know if there is something else better around.  Again
any feedback would appreciated.

If I end up having to get this stuff built myself I'll try to get
patches submitted to the appropriate project, hopefully including a CW
project file to simplify the process for anyone else that needs to do
this.  I'd also try to make available what I build as prebuilt libraries
for people to download.  Thanks,

Micah
James W. Walker - 19 Feb 2004 07:34 GMT
> Anyways, I was taking a look at
> the XML parsers out there.  I wasn't able to find an existing prebuilt
> lib of any of the common ones(expat, Xerces, libxml) for Classic and
> Carbon, which is what I need.  So does anyone know of any such resource?

You really need Classic?  Why, you're supporting OS 8?

If you could assume CarbonLib, you could consider using property list
format, which is a restricted form of XML but still pretty general.

> Barring an existing lib, I'll try to get one of these guys built
> myself.  
> Expat seems like it might be the simplest of them all to get built just
> based on a quick glance at the different sources.  Anyone have any
> experience or advice about which XML parser they like best?

I haven't tried the others, but expat wasn't hard to get set up.
Micah Koch - 19 Feb 2004 13:05 GMT

> You really need Classic?  Why, you're supporting OS 8?
>
> If you could assume CarbonLib, you could consider using property list
> format, which is a restricted form of XML but still pretty general.

I currently support Classic.  I'm not entirely opposed to discontinuing
that support.  This is just a hobby app, with a relatively small user
community.  If I run into too much trouble trying to get another parser
built, I'll consider this option.

> > Barring an existing lib, I'll try to get one of these guys built
> > myself.  
[quoted text clipped - 3 lines]
>
> I haven't tried the others, but expat wasn't hard to get set up.

Okay, I'll probably give it a shot first then.  Thanks for the feedback,
Micah
Thomas Engelmeier - 23 Feb 2004 10:49 GMT

> > You really need Classic?  Why, you're supporting OS 8?
> >
[quoted text clipped - 5 lines]
> community.  If I run into too much trouble trying to get another parser
> built, I'll consider this option.

I would refrain from using the CFXML routines and format for anything
bejond absolutely simplistic structures. It's verbosity make it
extremely hard to keep track with an manual editor of complex, nested
structures.

Expat is extremely easy to build, but gives you 'only' the XML parsing
side. Implementing XML output is another half an day (mostly with the
Text encoding converter docs) and half an day debugging stuff like
forgotten escaping of >, < and & ;-)

If you can require Quicktime 5+, then there is also an XML Parser API
included:
<http://developer.apple.com/documentation/QuickTime/WhatsNewQT5/QT5NewCha
pt1/chapter_1_section_40.html>

Regards,
  Tom_E

Signature

This address is valid in its unmodified form but expires soon.

Paul Miller - 24 Feb 2004 18:35 GMT
>Barring an existing lib, I'll try to get one of these guys built myself.  
>Expat seems like it might be the simplest of them all to get built just
>based on a quick glance at the different sources.  Anyone have any
>experience or advice about which XML parser they like best?

What you are trying to do might be overkill. Take a look at my simple XML
processor: http://www.fxtech.com/xmlio

This was designed to be a lightweight application data I/O layer that you
can integrate directly with your objects. It supports things like reading
values directly into your object data members.
Micah Koch - 24 Feb 2004 23:37 GMT
> >Barring an existing lib, I'll try to get one of these guys built myself.  
> >Expat seems like it might be the simplest of them all to get built just
[quoted text clipped - 7 lines]
> can integrate directly with your objects. It supports things like reading
> values directly into your object data members.

Sounds great.  I would definately like to keep things as simple as
possible, and this looks like it would do exactly what I need.  Thanks
for the tip,
Micah
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.