Re: C++ XML Parser of choice

2003-11-19 Thread Jeremy Furtek
- Original Message - 
From: "Jon Berndt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 18, 2003 6:54 PM
Subject: RE: C++ XML Parser of choice
> I managed to build Xerces-C++ under Cygwin today.  Unfortunately, it built
a
> .dll.  Dohhh!  Do you know offhand if it is possible to build a .lib under
> Cygwin?  I suspect it is.

My experience has been with VC++6 only, so I don't know off the top of my
head.

I did a little bit of digging, and as near as I can tell the developer(s)
did not include the ability to automatically do this.

There are a number of threads in the Xerces-C-Dev mailing list about this:
http://marc.theaimsgroup.com/?l=xerces-c-dev

>From a Visual C++ point of view, it seems that some people have had success
with changing the definition of the PLATFORM_EXPORT and PLATFORM_IMPORT
preprocessor definitions src\xercesc\util\Compilers\VCPPDefs.hpp. The
standard approach for defining these (in my experience, anyway) is
documented for Xerces here:

http://tinyurl.com/vp8m
http://tinyurl.com/vp9y

As far as Cygwin is concerned, I haven't used it and gcc together enough to
remember exactly how they handle what Visual C++ and the OS do. It seems
that some people have been able to just use "ar" to archive the object
files:

http://tinyurl.com/vpbp

Sorry that I can't be of more help...

Jeremy Furtek
Delphi Research
mailto:[EMAIL PROTECTED]




RE: C++ XML Parser of choice

2003-11-18 Thread Jon Berndt
> From: Jeremy Furtek [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 16, 2003 3:43 PM
> To: [EMAIL PROTECTED]
> Subject: Re: C++ XML Parser of choice
>
> I have been using the Xerces-C++ parser for an application, and
> it has been more than adequate.
>
> http://xml.apache.org/xerces-c/index.html

I managed to build Xerces-C++ under Cygwin today.  Unfortunately, it built a
.dll.  Dohhh!  Do you know offhand if it is possible to build a .lib under
Cygwin?  I suspect it is.


Jon

--

Project Coordinator
JSBSim Flight Dynamics Model
http://www.jsbsim.org




Re: C++ XML Parser of choice

2003-10-17 Thread Bruce Jackson
At 1:43 PM -0700 10/16/03, Jeremy Furtek wrote:
> > Does anyone on the list have experience using an XML parser
>> with C++? If so, can you recommend a decent set of parser tools?
>
>I have been using the Xerces-C++ parser for an application, and it has been
>more than adequate.
>
>http://xml.apache.org/xerces-c/index.html
>
>I have also used expat.
>
>http://www.jclark.com/xml/expat.html
>
>The Xerces-C++ parser seems pretty complete. You can parse documents using
>either the SAX or DOM interfaces. (When using SAX, you provide callback(s)
>for XML element beginning and endings. The DOM interface builds a tree in
>memory of the entire document contents, which you can then "walk.") My
>favorite thing about Xerces-C++ is its support of XML Schema. You can
>provide the parser with an XML Schema file (which is like a DTD, only in XML
>format) and the parser will notify you if the document doesn't conform.
>
>Expat seems to be a more minimalist implementation. It is not a "validating"
>parser. It is written in C, and offers a SAX-style interface.
>
>If pure speed is important to you...
>
>(I am not saying that it should be. I only bring it up because it has been
>mentioned in this group recently.)
>
>you might want to look at the internal character representations used by the
>parsers that you consider. XML files can be encoded with 8 or 16 bit
>characters. The Xerces-C++ parser interface uses 16 bit characters,
>regardless of the encoding of the document. If I remember correctly, expat
>uses 8 bit characters. If all of your XML files are encoded in 8 bits, you
>might be able to realize a small performance gain by using a parser that
>takes advantage of this fact.
>
>Of course, if speed is that important, you could probably select a better
>format than XML.

At 9:30 AM -0500 10/15/03, Riley Rainey wrote:
>Hey Bruce,
>
>Our company uses Xerces-C quite a lot.  It does provide for different styles
>of programmatic access and my experience so far has been positive.
>
>At a previous company I worked with Microsoft's XML Parser and DOM (DOM ==
>Document Object Model, for those who didn't know); DOM access worked well in
>most cases, but MSFT requires that you embrace some form of COM programming
>style in your C++ code (e.g. ATL).
>
>Riley

At 10:25 AM -0400 10/15/03, York, Brent W.  CIV NAVAIR 4.3.2.3 wrote:
>Bruce,
>
>We've used MSXML and Expat. We use a wrapper library called "SAXinCPP," which is open 
>source thing you can find on the Internet. I think the guy who wrote it changed the 
>name to something catchier, though, since we started using it. If you want, I can 
>have our XML expert send what we have to you...
>
>_Brent

At 9:38 AM -0500 10/15/03, Jon S Berndt wrote:
>Hi, Bruce:
>
>Check out the FlightGear (www.flightgear.org) project for one example ("easyXML") and 
>perhaps ask a question on their developer list (or I can do that). For JSBSim, I 
>wrote a very limited parser in C++ that I use, but I've been wanting to evolve into 
>using a more capable parser - a *real* one.  Of course, for my project I need to 
>consider open source projects. There are two (as I recall): TinyXML, and eXpat - both 
>on the SourceForge web site:
>
>http://tinyxml.sf.net
>http://expat.sf.net (see the C++ wrappers links)
>
>Good luck,
>
>Jon



Thanks, Jon, Brent, Riley & Jeremy. I'd been eyeing Xerces-C++ but was not aware of 
the 16-bit (UNICODE, I guess) character representation. I might stick with it anyway 
since it seems like the right choice (open source, well-supported, and popular).

I've been using Xerces-J for a Java XML application, and am well satisfied with it; I 
wanted to see if maybe I was missing a better solution.

I'll look into the other suggestions (expat, easyXML, tinyXML, and SAXinCPP) but 
suspect MSXML is a Windows-only solution?

Thanks again for the rapid response!

--Bruce


Re: C++ XML Parser of choice

2003-10-16 Thread Jeremy Furtek
> Does anyone on the list have experience using an XML parser
> with C++? If so, can you recommend a decent set of parser tools?

I have been using the Xerces-C++ parser for an application, and it has been
more than adequate.

http://xml.apache.org/xerces-c/index.html

I have also used expat.

http://www.jclark.com/xml/expat.html

The Xerces-C++ parser seems pretty complete. You can parse documents using
either the SAX or DOM interfaces. (When using SAX, you provide callback(s)
for XML element beginning and endings. The DOM interface builds a tree in
memory of the entire document contents, which you can then "walk.") My
favorite thing about Xerces-C++ is its support of XML Schema. You can
provide the parser with an XML Schema file (which is like a DTD, only in XML
format) and the parser will notify you if the document doesn't conform.

Expat seems to be a more minimalist implementation. It is not a "validating"
parser. It is written in C, and offers a SAX-style interface.

If pure speed is important to you...

(I am not saying that it should be. I only bring it up because it has been
mentioned in this group recently.)

you might want to look at the internal character representations used by the
parsers that you consider. XML files can be encoded with 8 or 16 bit
characters. The Xerces-C++ parser interface uses 16 bit characters,
regardless of the encoding of the document. If I remember correctly, expat
uses 8 bit characters. If all of your XML files are encoded in 8 bits, you
might be able to realize a small performance gain by using a parser that
takes advantage of this fact.

Of course, if speed is that important, you could probably select a better
format than XML.

Jeremy Furtek
Delphi Research
mailto:[EMAIL PROTECTED]





Re: C++ XML Parser of choice

2003-10-15 Thread Jon S Berndt
On Wed, 15 Oct 2003 10:08:17 -0400
On Wed, 15 Oct 2003 10:08:17 -0400
 Bruce Jackson <[EMAIL PROTECTED]> wrote:
Does anyone on the list have experience using an XML parser with C++? 
If so, can you recommend a decent set of parser tools?

--Bruce
Hi, Bruce:

Check out the FlightGear (www.flightgear.org) project for one example 
("easyXML") and perhaps ask a question on their developer list (or I 
can do that). For JSBSim, I wrote a very limited parser in C++ that I 
use, but I've been wanting to evolve into using a more capable parser 
- a *real* one.  Of course, for my project I need to consider open 
source projects. There are two (as I recall): TinyXML, and eXpat - 
both on the SourceForge web site:

http://tinyxml.sf.net
http://expat.sf.net (see the C++ wrappers links)
Good luck,

Jon


RE: C++ XML Parser of choice

2003-10-15 Thread Riley Rainey
Hey Bruce,

Our company uses Xerces-C quite a lot.  It does provide for different styles
of programmatic access and my experience so far has been positive.

At a previous company I worked with Microsoft's XML Parser and DOM (DOM ==
Document Object Model, for those who didn't know); DOM access worked well in
most cases, but MSFT requires that you embrace some form of COM programming
style in your C++ code (e.g. ATL).

Riley

-Original Message-
From: Bruce Jackson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 9:08 AM
To: [EMAIL PROTECTED]
Subject: C++ XML Parser of choice

Does anyone on the list have experience using an XML parser with C++? If so,
can you recommend a decent set of parser tools?

--Bruce
--
Bruce Jackson mailto:[EMAIL PROTECTED] Dynamics and Control Branch
18C West Taylor Street MS 132Airborne Systems Competency
NASA Langley Research CenterBuilding 1192C, Room 149
Hampton, VA 23681-0001scud://N 37 05'31.7" W 76 22'55.1"
http://dcb.larc.nasa.gov/DCBStaff/ebj/ebj.html "There is no try"