Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Newibe C++ XML Questions (http://www.velocityreviews.com/forums/t168829-newibe-c-xml-questions.html)

BCC 02-21-2005 03:35 AM

Newibe C++ XML Questions
 
Hi,

I have a small app that needs to read in an xml file that I create, and then
initialize some variable and objects with the data in the file.

Ive taken a look around and still cant decide which way I should go for c++
in VC7.

I downloaded and installed xerces, and holy crappola, there is waaaaay too
much information there for me to sort out what I need. Between the DOM,
event driven SAX1, SAX2, I have really no clue where to go.

I managed to use SAX2 to read in my xml document, but I cant find any
documentation anywhere that tells me how to extract the info I need from the
xml and use it. All the sample apps from the xerces site either read in a
file or just write one out... I dont see where they read one in and suck out
the data within the file. Very frustrating.

Is xerces really the best way to go?? Seems like way overkill for what I
want to do, and quite simply, I cant figure out how to use it. .NET has its
own xml parser, but I dont want to use managed C++.

Do I want to use DOM or SAX? Are there other smaller utilities that will
get me to where I want to go?

Any suggestions are appreciated.

Bryan



Ioannis Vranos 02-21-2005 04:08 AM

Re: Newibe C++ XML Questions
 
BCC wrote:

> Hi,
>
> I have a small app that needs to read in an xml file that I create, and then
> initialize some variable and objects with the data in the file.
>
> Ive taken a look around and still cant decide which way I should go for c++
> in VC7.
>
> I downloaded and installed xerces, and holy crappola, there is waaaaay too
> much information there for me to sort out what I need. Between the DOM,
> event driven SAX1, SAX2, I have really no clue where to go.
>
> I managed to use SAX2 to read in my xml document, but I cant find any
> documentation anywhere that tells me how to extract the info I need from the
> xml and use it. All the sample apps from the xerces site either read in a
> file or just write one out... I dont see where they read one in and suck out
> the data within the file. Very frustrating.
>
> Is xerces really the best way to go?? Seems like way overkill for what I
> want to do, and quite simply, I cant figure out how to use it. .NET has its
> own xml parser, but I dont want to use managed C++.
>
> Do I want to use DOM or SAX? Are there other smaller utilities that will
> get me to where I want to go?



This is off topic in clc++, regarding vc++ you should ask in
microsoft.public.dotnet.languages.vc.


If it doesn't appear in your news server use the public MS newserver:

msnews.microsoft.com


That said, .NET provides full XML support of its own.


Check

http://msdn.microsoft.com/library/de...tframework.asp


and especially the classes XmlTextReader, XmlTextWriter (forward only
parsing), XmlReader, XmlWriter, XmlDocument (in memory DOM
representation of an XML document), XPath, for queries and others.


Probably you will have to read a book or something. There are
specialised .NET books for XML, that you may read.




--
Ioannis Vranos

http://www23.brinkster.com/noicys

Martin Honnen 02-21-2005 01:47 PM

Re: Newibe C++ XML Questions
 


BCC wrote:


> I have a small app that needs to read in an xml file that I create, and then
> initialize some variable and objects with the data in the file.
>
> Ive taken a look around and still cant decide which way I should go for c++
> in VC7.


So you are on Windows and build a Windows application? Microsoft has
MSXML, a COM based software package for XML parsing including SAX, DOM,
XSLT, XPath support, in MSXML version 4 even XML schema support.
Check out http://msdn.microsoft.com/ for MSXML 4, you can get the SDK
there, then ask further questions in the XML groups on the MS news
server news.microsoft.com.

--

Martin Honnen
http://JavaScript.FAQTs.com/


All times are GMT. The time now is 06:14 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57