regarding xml parser
| Wed, 2005-11-09 06:20 | |
|
HI Guys,
I had few doughts about the xml parsing in symbian. iam using the symbian sdk 7.0s and i want to use the available parsers like expat , syexpat and eaxp. i had gone through the article in newlc and no one had give proper procedure to build it. i tried all the parsers but i failed to creat the dll.... some one atleast give me the steps to build the parser.... another thing is that i dont find any xml document in the expat project folder. i had seen some piece of xml code in cpp file but i dont want in that way .... i need a parser which can parse through the given xml document and give me the details.... kindly give the exact procedure .... i had gone through all the previous postings in this forum but none had given the procedure but they answered so many quieries... kindly help this time so that it will be a usefull article to other upcomming developers..... |
|






Forum posts: 18
i downloaded the expat-1.95.8 from net and i did the following procedure
1) first i used the lib folder and i could able to make the libexpat.dll
2)then i opened the test folder and i could able to creat the benchmark.exe and i could able to run the exe if i paste the libexpat.dll in the debug forlder of the bechmark.
3)then i opened the example folder there i created workspace for both the elements and outline and i could able to create the exe's for both elements and outline. but i dont know how to give the input to the elements.exe, when i run the exe a command prompt is opening but i dont know what to give as an input to that.... can any one suggest how to run it.
4)next i created workspace for syexpat.mmp when i build through the command promt it shows more than 100 warnings but it is creating syexpat.dll. so can i just ignore warnings and go ahead with the dll or i need to do some changes to avoid that warnings.
5) when i created workspace for syexpat.mmp and when i tried to build in vc6 it shows me morethan 100 errors..... where as iam not getting it when i build through command pompt.
6) there is no separate xml file in the project. so should we write a separate class for using xml and use the functions in dll to parse it....?
kindly give me a suggestion on this ..... iam working hard on this from past few days but nothing is working out well..... i hope u people got my procedure..... if any thing wrong kindly guide me.....
Forum posts: 18
Forum posts: 140
1. NDS 1.1 removes the .c files from the MMP file if you update the mmp file inside devstudio, I have no idea why this happens but will result
in the build failing with linker errors.
2. NDS 1.1 Does not support macros in MMP files, so
you will need to go to the project settings and add
the macros in manually. - HAVE_EXPAT_CONFIG_H is the macto in question
The benchmark sample is only for windows, not Symbian. All the symbian samples are under the symbian folder.
Look at the elements sample for source code usage. That means actually run it in the debugger step by step. The xml in elements is a hard coded xml string. The file xample looks for a file in the symbian c:\ folder.
Paul Todd
Forum posts: 18
Thanks for your quick responce.... now i could able to compile the syexpat and i have created the syexpat.lib and syexpat.dll.... i have included lib in my project and it is working fine for parsing the xml file....
my question is that both the lib and dll are created for wins platform.... when i compile my project for thumb it is throwing erors...... should i need to compile the syexpat for thumb platform and then i have to compile my project ?
is there any procedure to be followed when using the dll and lib while building for thumb or armi platforms.....
Forum posts: 18
I had used Syexpat XML Parser for my application it is working fine in the emulator but when i try to compile my App for target ie THUMB or ARMI it is throughing....
"Relocation truncated to fit ARM_THUMB23"
Did any one tried building APP using the Syexpat parser for ARMI or THUMB build ?
In some articals they said it is due to writable static variables in the DLL but due to the complexity of the parser iam unable to make changes in the syexpat.
It is working fine in the emulator but i need to port it to device could anybody there to help me out.
Forum posts: 140
Paul Todd
Forum posts: 18
Thaks for your help....since u had requested iam sending the error messages i got when i tried to build my App for thumb urel....
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\xxxx\THUMB\UREL\xxxx.in(../../../7.0S/SERIES60_V20/EPOC3
2/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x962):xxxxqnscon: undefined reference to `CSyParser::NewLC(TDesC16 const &)'
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\SURVEY60\GROUP\SURVEY60\THUMB\UREL\SURVEY60.in(../../../7.0S/SERIES60
_V20/EPOC32/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x962):xxxxqnscon: relocation truncated to fit: ARM_THUMB23 CSyParser::NewLC(TDesC16 const &)
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\xxxx\THUMB\UREL\xxxx.in(../../../7.0S/SERIES60_V20/EPOC3
2/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x972):xxxxqnscon: undefined reference to CExpatParserBase::SetHandler(MSyDocHandler *)'
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\xxxx\THUMB\UREL\xxxx.in(../../../7.0S/SERIES60_V20/EPOC3
2/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x972):xxxxqnscon: relocation truncated to fit: ARM_THUMB23 CExpatParserBase::SetHandler(MSyDocHandler *)
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\xxxx\THUMB\UREL\xxxx.in(../../../7.0S/SERIES60_V20/EPOC3
2/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x984):xxxxqnscon: undefined reference to CExpatParserBase::SetHandler(MSyDeclHandler *)'
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\xxxx\THUMB\UREL\xxxx.in(../../../7.0S/SERIES60_V20/EPOC3
2/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x984):xxxxqnscon: relocation truncated to fit: ARM_THUMB23 CExpatParserBase::SetHandler(MSyDeclHandler *)
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\xxxx\THUMB\UREL\xxxx.in(../../../7.0S/SERIES60_V20/EPOC3
2/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x9dc):xxxxqnscon: undefined reference to `CExpatParserBase::Parse(TPtrC8, int)'
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\xxxx\THUMB\UREL\xxxx.in(../../../7.0S/SERIES60_V20/EPOC3
2/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x9dc):xxxxqnscon: relocation truncated to fit: ARM_THUMB23 CExpatParserBase::Parse(TPtrC8, int)
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\xxxx\THUMB\UREL\xxxx.in(../../../7.0S/SERIES60_V20/EPOC3
2/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x9e6):xxxxqnscon: undefined reference to
`CExpatParserBase::GetCurrentLineNumber(void) const'
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\xxxx\THUMB\UREL\xxxx.in(../../../7.0S/SERIES60_V20/EPOC3
2/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x9e6):xxxxqnscon: relocation truncated to fit: ARM_THUMB23 CExpatParserBase::GetCurrentLineNumber(void) const
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\xxxx\THUMB\UREL\xxxx.in(../../../7.0S/SERIES60_V20/EPOC3
2/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x9ee):xxxxqnscon: undefined reference to
`CExpatParserBase::GetCurrentColumnNumber(void) const'
..\..\..\7.0S\SERIES60_V20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\xxxx\THUMB\UREL\xxxx.in(../../../7.0S/SERIES60_V20/EPOC3
2/BUILD/SYMBIAN/PROJECT/xxxx/GROUP/xxxx/THUMB/UREL/xxxxQNSCONTAINER.o)(.text+0x9ee):xxxxqnscon: relocation truncated to fit: ARM_THUMB23 CExpatParserBase::GetCurrentColumnNumber(void) const
make[1]: ***
[..\..\..\7.0S\SERIES60_V20\EPOC32\RELEASE\THUMB\UREL\xxxx.APP] Error 1
make: *** [TARGETxxxx] Error 2
make -r -f "\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\PROJECT\xxxx\GROUP\THUMB.make" FINAL CFG=UREL VERBOSE=-s
the fuction names which are showing in the above are from Syexpat Parser DLL.
Any suggestions......