开发者

Reading from XML file using XmlHandler class from Forum Nokia - Symbian C++

开发者 https://www.devze.com 2023-01-06 16:28 出处:网络
I\'m trying to use XmlHandler class ( link to Forum Nokia with code of XmlHandler Class ) on Symbian S60 3rd FP2 edition to read xml files. I have in my function开发者_Python百科 this code:

I'm trying to use XmlHandler class ( link to Forum Nokia with code of XmlHandler Class ) on Symbian S60 3rd FP2 edition to read xml files. I have in my function开发者_Python百科 this code:

CXmlHandler *iXmlHandler;
TFileName fileName;

iXmlHandler = CXmlHandler::NewL();
fileName.Append( KConfigFile );
iXmlHandler->StartParsingWithAoL( fileName );

But I don't know how to use data from KConfigFile...

Can anybody tell me how I can read nodes from my XML file and use data from nodes?


That example is a normal complete SAX parser. You get your nodes as callbacks, so you need to add your logic to OnStartElementL.


You need to add code to the various OnStart* and OnEnd* member functions. The parser will call these functions in order as it proceeds through the file. The arguments to the functions will contain the information about what tag is opening and closing. If you want to store any of the parsed information it is up to you to do so in these functions.

0

精彩评论

暂无评论...
验证码 换一张
取 消