I am new in VC++. As to modify a software,I have to read contents of an .xml file. From this data I have to manipulate further, While I tried it by copying to a CString, it reads by word by word(cuts at spaces). But I need at least a line by line need. plz help me...

Recommended Answers

All 2 Replies

Which version of C++?
Later versions come with libraries to parse XML automatically, without you having to deal with all the < > stuff yourself.

Failing that, use a library
http://expat.sourceforge.net/

I would also ditch the MFC file handling classes such as CFile and CArchive, but use normal standard c++ fstreams and std::string, which are a whole lot easier to use. That assumes you are using a compiler that supports fstreams and std::string -- some embedded compilers do not.

commented: Compilers that don't support fstream == fail! X_X +4
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.