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

Re: XML Schema --> C++

  • From: "Abhishek Srivastava" <abisheks@i...>
  • To: <xml-dev@i...>
  • Date: Thu, 20 Jan 2000 16:35:32 +0530

xml schema c
I also want to auto generate code of a c++ class that could contain the data
of an XML file.
I tried to create one but found it very complex as the DTD can have

1. any level of nested elements and aggregates.
2. Elements and attributes can optional.
3. The OR conditions that are specified in the DTD.

Is it possible we have something like a IDL compiler ? the idl compiler
reads the IDL file and generates C++ classes that can be used to implement
that object. Can a utility read a DTD or a schema and auto generate the code
for a C++ class.

This utility will be very useful, as many legacy systems do not understand
the DOM tree or xml... so in order to reuse the legacy code the data from
the dom tree needs to be put in a regular c++ object and fed to the legacy
system and the output from a C++ object converted to xml and then sent over
the web.

If an effort is started to write such a utility what other complexities
might arise ?

regards,
Abhishek.

----- Original Message -----
From: "Jean Marc VANEL" <jean-marc_vanel@e...>
To: <xml-dev@i...>; <xml-dev-ig%PMDF%MHMAIL@m...>; "tcs-infra"
<tcs-infra@e...>; "Madjid OUTENAH" <m_outenah@e...>;
<s_durfort@m...>; <j_lolieux@m...>;
<f_clerc@m...>; <thomas_moutel@e...>; <d_asseline@e...>;
<guy_dauchet@e...>; "Sonia BILLINGS" <s_billings@e...>
Sent: Thursday, January 20, 2000 3:12 PM
Subject: XML Schema --> C++


>
>
> Hello
>
> I want to try to generate C++ class declarations from an XML Schema .
>
> Something like:
>
> <template select = '//type' >
>   class <value-of select="@name"/> {
>    <apply-templates/>
>   };
> </template>
>
> <template select = '//element' >
>   <value-of select="@type"/> <value-of select="@name"/> ;
> </template>
>
> Remarks:
> - not yet tested
> - as writen this would generate embeded classes
> - ID's and IDREF's would map to void* and list<void*>
> - same principle could be applied to Java etc
> - it is desirable to also generate code to fill the C++ objects using DOM
or SAX API, but it seems more difficult
> - it's also possible (another project!) to parse C++ declarations and
generate an XML Schema ; could a round-trip be possible ?
>
>
>
> 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/ or CD-ROM/ISBN
981-02-3594-1
> Please note: New list subscriptions now closed in preparation for transfer
to OASIS.
>
>


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/ or CD-ROM/ISBN 981-02-3594-1
Unsubscribe by posting to majordom@i... the message
unsubscribe xml-dev  (or)
unsubscribe xml-dev your-subscribed-email@your-subscribed-address

Please note: New list subscriptions now closed in preparation for transfer to OASIS.



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.