×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    15

    Lightbulb XMl Parser Implementation for Symbian

    Hi All,
    I am trying to implement XML parser for Symbian, wanted to know whether any of you have implemented this . PLease let me know . I had gone through the XML parser implementation at www.newlc.com by Paul Todd, but couldnt get much information .
    --
    Regards,
    Ravi MS

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    64
    What do you think is missing with Todd's SyExpat ? I've been using it for some time now and, apart from a few rough edges, am fairly happy with it. My hint: take a close look at the GoogleIt example that comes with it. That should give you all the basics you need.

    Ah, and another thing: better do not forget to add SyExpat.dll to the sis file - might cost you a few fruitless debugging sessions if you do *sigh*

    S.

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    15
    Hi,
    Can u just brief me up.. regarding this.... i got huge amount of errors .. while running the examples... itself ...
    can't fins SyExpat.hand other header files ... given by him...
    let me how the XML Parsing function is define. If u have an example can u send it across .. Let me know details regarding it ....

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    64
    Well, GoogleIt is for UIQ rather than Series 60 so you won't be able to compile it. But you can still use it as documentationary material...

    To start things, go to the SyExpat\Symbian directory and build from the SyExpat.mmp stored there. You will find the headers there, too.

    Then create a new S60 app. project and add the contents of GoogleIt's GoogleItQueryBuilder.cpp file to it. That should give you a feeling of how to create XML. Then add GoogleItQueryParser.cpp's contents as well . That should give you a hint at how to parse content.

    I've done it that way and it actually worked. I just finished another Web Service client for Series60 this morning. :-)

    Cheers,
    Stevie

  5. #5
    Registered User
    Join Date
    Dec 2004
    Posts
    15
    Hi,
    I have Downloaded the SyExpat Files from NEwLC, placed it in the examples folder then used makmake command to get the .dsw file, opened it in VC++ IDE, tried to build. But getting huge amount of errors. well can u let me know how you had done it .

    Regards,
    Ravi MS

  6. #6
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    64
    Which VS version? Which SDK version? Which SyExpat version (You should go for the one directly from toddsoftware.com...)?

  7. #7
    Registered User
    Join Date
    Dec 2004
    Posts
    15
    Yes.... i got the SyExpat from Toddsoftware only... i am using SDK series 60..... Version is ... 126 Series 60 v2.1 Final DOT NET 03.06.2004 0840 ...

  8. #8
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    64
    Okay, then. Can you be more specific about the errors you get? With CW it was just an import of the MMP file and a subsequent build...

    Cheers,
    Stevie

  9. #9
    Registered User
    Join Date
    Dec 2004
    Posts
    15
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(1) : error
    C2143: syntax error : missing '{' before '*'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(2) : error
    C2091: function returns function
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(3) : warning
    C4131: 'NS' : uses old-style declarator
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(4) : warning
    C4013: 'ns' undefined; assuming extern returning int
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(4) : error
    C2065: 'internal_utf8_encoding' : undeclared identifier
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(4) : error
    C2224: left of '.enc' must have struct/union type
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(4) : warning
    C4033: 'NS' must return a value
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(9) : warning
    C4131: 'NS' : uses old-style declarator
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(9) : error
    C2084: function 'int *(__cdecl *__cdecl NS())(void )' already has a body
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(17) : error
    C2224: left of '.enc' must have struct/union type
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(18) : error
    C2065: 'internal_big2_encoding' : undeclared identifier
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(18) : error
    C2224: left of '.enc' must have struct/union type
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(18) : warning
    C4033: 'NS' must return a value
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(22) : error
    C2143: syntax error : missing '{' before '*'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(22) : error
    C2059: syntax error : 'type'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(33) : error
    C2061: syntax error : identifier 'NS'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(33) : error
    C2059: syntax error : ';'
    C:\SYMBIAN\7.0S\SERIES~1
    \EXAMPLES\EXPAT\LIB\Xmltok_ns.c(34) : error
    C2059: syntax error : ')'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(41) : error
    C2061: syntax error : identifier 'NS'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(41) : error
    C2059: syntax error : ';'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(41) : error
    C2143: syntax error : missing ')' before '*'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(41) : error
    C2143: syntax error : missing '{' before '*'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(41) : error
    C2059: syntax error : 'type'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(42) : error
    C2059: syntax error : ')'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(49) : error
    C2143: syntax error : missing ')' before '*'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(49) : error
    C2091: function returns function
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(49) : error
    C2143: syntax error : missing '{' before '*'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(49) : warning
    C4228: nonstandard extension used : qualifiers after comma in
    declarator list are ignored
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(49) : error
    C2143: syntax error : missing ';' before '*'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(49) : warning
    C4218: nonstandard extension used : must specify at least a storage class or a type
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(50) : error
    C2059: syntax error : 'type'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(50) : error
    C2059: syntax error : ')'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(64) : error
    C2143: syntax error : missing '{' before '*'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(65) : error
    C2143: syntax error : missing ')' before '*'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(65) : error
    C2091: function returns function
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(65) : error
    C2143: syntax error : missing '{' before '*'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(65) : error
    C2059: syntax error : 'type'
    C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_ns.c(65) : error
    C2059: syntax error : ')'
    C:\SYMBIAN\7.0S\SERIES~1\
    >>C:\SYMBIAN\7.0S\SERIES~1\EXAMPLES\EXPAT\LIB\Xmltok_impl.c(1739) :
    >>error
    >>C2059: syntax error : 'type'
    >>Generating Code...
    >>Error executing cl.exe.
    >>
    >>SYEXPAT.dll - 126 error(s), 7 warning(s)

  10. #10
    Registered User
    Join Date
    Dec 2004
    Posts
    15
    There were many other errors... it is not possible to put all the errors in this list... let me know .. how you implemented it ... where did u place your XML document... what kind of output you got ... please let me know in detail... i am using VC6 IDE not COde warrior ...

  11. #11
    Registered User
    Join Date
    Nov 2003
    Location
    Mumbai, India
    Posts
    142
    you just want to parse and generate xml file is it ?

    if you have downloded the SyExpat from Todd's site
    first just unpack it.(on symbian sdk drive).and in SyExpat folder.

    now create group folder (hierarchy should be with symbian folder i.e inside SyExpat folder)
    copy the .mmp and .bld file from symbian into this group folder.


    content of the mmp file should be as follow
    /////////////////////////////////////////////////////////////////////
    // Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
    // See the file COPYING for copying permission.

    TARGET SyExpat.dll
    TARGETTYPE dll

    // Symbian have allocated this id to toddsoftware
    // KUidToddsoftware - this will prevent application
    // clashes with other variants.
    UID 0x1000008d 0x10204762

    // Uncomment the line below to do
    // static variable anaysis
    //OPTION GCC -save-temps


    // Tell the expat parser we are building
    // for a new platform
    MACRO HAVE_EXPAT_CONFIG_H

    USERINCLUDE . ..\lib ..\Symbian

    SOURCEPATH ..\Lib
    SOURCE xmlparse.c xmlrole.c xmltok.c

    SOURCEPATH ..\Symbian
    SOURCE SyExpat.cpp SyGen.cpp

    SYSTEMINCLUDE \Epoc32\include \epoc32\include\libc ..\Symbian ..\Lib

    LIBRARY estlib.lib euser.lib

    EXPORTUNFROZEN
    ///////////////////////////////////////////////////////////////////////
    remove the entry of other example mmp file from bld.inf (you can build them later)

    now just build for it using normal commands

    bldmake bldfiles
    abld build wins udeb
    abld freeze wins
    abld build armi udeb
    abld freeze armi

    Regards,
    Micky

  12. #12
    Registered User
    Join Date
    Dec 2004
    Posts
    15
    I tried it .. but no use ... it is throwing error... like ..
    SyExpat.h, Syexpat.c , Sygen.c .. and may other files are missing.. Please explain me in detail about this ...
    where am i supposed to Unpack the Zip file..
    is it .. in Examples folder of the series 60 SDK .. after unzipping i am supposed to place .mmp file and .inf file in group folder and then run the normal commands in Command Prompt... right ...
    I did the same .. but not getting the result expected.. only errors...

  13. #13
    Registered User
    Join Date
    Nov 2003
    Location
    Mumbai, India
    Posts
    142
    unpack it into "c:\SyExpat" folder.

    (or whereever you put that it does not make any difference)

    inside it you create a folder name group
    i.e C:\SyExpat\Group
    now from symbian folder cut .mmp and bld.inf file and paste it into your group folder
    then goto group folder and do as i have told you earlier.

    iin the mmp file check your "userinclude" and "systeminclude " they should point to the exact foldar path.

    though,
    from your previous error it is very clear that userinclude path is not proper.

    Micky

  14. #14
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Hi,
    I programmed SAX parser for symbian, but I cannot opensource it...
    a) The best start point is to look on Xerces - http:// xml.apache.org / xerces -c/, it is opensource powerfull xml parser
    b) look on the SAX interface you must implement. For SAX the best page is http://www.saxproject.org.

    c) And of course for XML spec. search the W3C page http://www.w3.org.

    For symbian 6.1 exists two parsers Expat, which is port from C, so it is not native Symbian parser and EAXP, which is poorely written tiny xml parser - as author said it was written in one day

    I think that it is not necessary to support DTD, but parsing elemens, comments, CDATA section, attributes, empty elements, processing instructions, character references, built-in references and white spaces are MUST. It is also good to check correct nesting. Napespaces should be also supported.

    Good Luck
    STeN

  15. #15
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    64
    Sorry, I was out of the office all day - no time to answer.

    Thanks for your error listing. After a quick look I'd say all errors come from one of the example projects. Have a look at %EPOCROOT%\epoc32\release\wins\udeb (or winscw for that matter) and check if you got a syexpat.lib there. If so, your library code indeed has compiled properly.

    From there on, next would be to get a working example -- but that's a different beast.

    So, first please check for the syexpat.lib !

    Cheers,
    Stevie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×