Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML Newbie - C structures

Reply
Thread Tools

XML Newbie - C structures

 
 
bigbiker71@hotmail.com
Guest
Posts: n/a
 
      12-26-2003
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
 
Reply With Quote
 
 
 
 
Sean Bright
Guest
Posts: n/a
 
      12-30-2003
wrote:
> 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
 
Reply With Quote
 
 
 
 
Finnbarr P. Murphy
Guest
Posts: n/a
 
      12-31-2003
wrote in message news:<Xns945D60EABD21Bmk@65.32.1.8>...
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie: Using XML for normalized data structures Glenn XML 1 08-24-2006 06:09 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
structures, structures and more structures (questions about nestedstructures) Alfonso Morra C Programming 11 09-24-2005 07:42 PM
newbie having trouble with control structures: loop till recieve string QUIT M. Duijkers Perl 2 12-12-2004 11:02 AM
Type Casting IPv4 and IPv6 structures to Generic Structures tweak C Programming 14 06-11-2004 02:43 PM



Advertisments