tmeiczin/OpenDCP — comment on commit 0fe185ba8b8b96047283f2504ab134d81bd55ce1
File:  line 0
By tmeiczin:

It wasn't too hard to convert and I agree it should make thing easier
and more consistent in the future. I didn't use it originally because
I wanted to keep library dependencies to a minimum. The project has
grown a bit since then, so might as well now. You only need a
start/end in certain cases, if the element will have child elements.
The textwriter APIs are serial, much like the printf method I was
using before. It just essentially prints to an in memory document. You
could use XML tree APIs and the don't need start/ends or need to worry
about order. You just add children to the tree, but you need a zillion
node pointers which are in some cases more of a pain to deal with.

I added an auto-resize as well, if the source image is not a DCI
compliant resolution. I'll write a better resize algorithm later,
right now it is essentially a pixel doubler.

On Mon, Dec 5, 2011 at 12:31 PM, Wolfgang Woehl

wrote:
> Yes! That should have been fun :)
>
> But seriously, using libxml should ease the pain in the long run, I guess. I'm a bit baffled though that one still needs to clasp everything with xmlTextWriterStartElement() ~ xmlTextWriterEndElement(). Don't know the api well enough but I reckon there should be some way to make libxml take care of closing tags?
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/tmeiczin/OpenDCP/commit/0fe185ba8b8b96047283f2504ab134d81bd55ce1#commitcomment-769664