[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-dev
Subject:    FW: SAX to parse an XML file to read data into C++ objects
From:       "Silbovitz, Anna" <silbovitz () ll ! mit ! edu>
Date:       2002-05-30 13:59:56
[Download RAW message or body]

I tried to send this yesterday, but it doesn't look like it went through...
I apologize if it goes twice


Hello,

I'm totally new to XML, and was told that it would be an easy way to parse a
file that contains data for my objects into C++.  I've been attempting to do
that using SAX, using the SAX2Print example, and am getting stuck...  

For example, if my XML file is:
<Apple>
	<color>
	red
	</color>
</Apple>

and I have defined a class Fruit that has char color;

When I find the tag <Apple> in my XML file, I want to create an instance of
an object Fruit* Apple = new Fruit();  and then read the color red into the
color variable.  

Is there a simple way to do this?  Any advice would be helpful.

Thanks!

Anna


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic