[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: simple XML for C++ application data-file I/O

  • From: Shaw Tim <tshw@c...>
  • To: xml-dev <xml-dev@i...>
  • Date: Mon, 6 Dec 1999 16:05:48 +0100

dev c file io
FWIW, I ended up having different (sub)DocHandlers for the different nesting
levels and implementing a Handler stack to push/pop them according to the
tags they handled. At least this way you can handle sub-trees fairly simply,
and reduce the bulk of code required for situations where you have many tags
identifying different sub-trees (and hence semantics).
A (minor) problem I had with this was that I looked up the Handlers based on
the tag-name - so there's a problem when the same tag is used in different
'contexts'.
It would be useful to associate a Handler with a given tag at the parser
initialisation level, using some XPath notation to identify the appropriate
tag(s).

tim

> -----Original Message-----
> From: Paul Miller [mailto:stele@f...]
> Sent: 06 December 1999 15:11
> To: xml-dev
> Subject: Re: simple XML for C++ application data-file I/O
> 
> 
> > We tried to keep SAX 1.0 as simple as possible -- how would you
> > simplify the following further?
> > 
> >     public void startElement (String name, AttributeList atts)
> >     {
> >       // do something!!
> >     }
> 
> Here is where I have the problem. This leaves an awful lot up to the
> application, still, including handling the proper nesting. I 
> would like
> to make the actual parsing of elements more "automatic", so when a
> certain element is hit, it calls a function with my object 
> pointer where
> I can pick up the parsing from there, then drop back out to the
> enclosing XML scope and keep going.
> 
> Perhaps what I want to do should be built on SAX instead of expat,
> though.
> 
> --
> Paul Miller - stele@f...
> 
> xml-dev: A list for W3C XML Developers. To post, 
> mailto:xml-dev@i...
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and 
> on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@i... the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@i... the 
> following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@i...)
> 
*********************************************************************
The information in this email is confidential and is intended solely 
for the addressee(s). 					
Access to this email by anyone else is unauthorised. If you are	not 
an intended recipient, you must not read, use or disseminate the 
information contained in the email. 			
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of 
The Capital Markets Company.				  

http://www.capitalmarketscompany.com
***********************************************************************

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.