[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: UrShape XML parser (Was: Shapes layout proposal)



Andre,

I think the general consensus is to use libxml for loading and saving only
since libxml only supports text data and no way to attach extra data to
nodes.  We also want to build a mini-DOM interface for accessing UrShapes.
Comments inline:

>
> Time for a few more thoughts:
> James has written a libxml/SAX tutorial which seems to fit in nicely.
> The only thing to do here is the callback stuff. Since we have our own
> object management stuff, we can afford writing the xml from within the
> object management. With this, we can also do the integer conversion on
> the fly, and whatever you prefer to do once while loading/saving. I'll
> wade the code somewhat deeper 'til next week, so I hope to be able to
> implement the parsing stuff by the time of 2 weeks, if not sooner -
> I'll need it for my diploma anyway ;). Given the urshape.h this
> shouldn't be too difficult...
>
> The advantages are:
> * We already use libxml - no new bindings created, so this extension
> will work in the same environment as before.
> * We can parse the stuff in any format we need. Wherever conversions
> (like char* -> integer) are useful, we follow Nike and just do it ;)

Yes, parse once use often.

> * The SAX stuff slurps up less memory than a whole DOM parser.

Since we are building our own tree then yes SAX is the way to go.

>
> * We can also add simple callbacks (object management - remember?) to
> perform i.e. serialization, even gfx routines, etc.

No callbacks right now.  That is the scripting phase.  We want to work on
default behavior first and then design a callback framework so that it is
consistent and allows us to easily introduce scripting.

> I don't yet know the disadvantages of this approach, so James, if you
> are around, please tell me. (Is this overkill? Can we reuse code?)

I think this is what we have been discussing all along.  Good, you can work
on the parser while James works on the internal structure and interface.

--J5






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK