XML Newbie - C structures

B

bigbiker71

I'm a long-time C/C++ programmer and I (and the company I work for) am just
getting started with XML. All I need is just a little help to get me
started. I've briefly looked at the samples supplied with the Xerces C++
library and I think I can get started from there, but what I really want to
do is use Xerces C++ or whatever else I need to read an XML file (created
from a group in another part of the company) into a buffer and populate a
C++ structure from the XML data. This data structure is then passed on for
further processing by other components.

If XSL can do all this, I'd like to know how and where I can find the book
or documentation. I'm kinda in a hurry to this because our development
group at work is just getting introduced to this and I would like to lead
this effort, hopefully down the right path.

In some cases, the XML tag is the same name as the field name in the C
structure, in another case, the XML tag is a business term which must be
translated into a field name. The XML document is primarily made up of a
sequence of simple elements, like <name>value</name>. There will also be
some nested groups of various types which look like <group><name1>value1
</name1><name2>value2</name2></group>.

I would appreciate any help in finding information on these subjects using
real world examples from start to finish. In other words, it's not enough
to just show the XML document and presto-changeo here's the C structure. I
want to see how it is transformed, What do I execute in order to make this
transformation happen? TIA
 
S

Sean Bright

If XSL can do all this, I'd like to know how and where I can find the book

You can't do this with XSL alone. You could use XSL to transform your
XML into a format that you could more easily read into a struct, but
you'd be better off just using the DOM directly and building your struct
manually. The Xerces documentation should be more than sufficient to
help you with this.

Good luck,
Sean
 
F

Finnbarr P. Murphy

I would appreciate any help in finding information on these subjects using
real world examples from start to finish. In other words, it's not enough
to just show the XML document and presto-changeo here's the C structure. I
want to see how it is transformed, What do I execute in order to make this
transformation happen? TIA

Have a look at the code examples and tutorial provided with libxml2
(www.libxml.org).

- Finnbarr
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top