AW: AW: [xml] xmlTextWriter

  Okay, can we get a merged version ? Pick the best of both, 
assemble it put both of you as Copyright owners and we will 
integrate this, okay ?

I'm all for that option :) I haven't had time to have a 
proper look at your 
version yet, so can't say yet which parts should be used from which :)

Ok with me.

I like my api on the xml writer better cause that's the one 
I'm already using 
in my own programs using the xml writer ^-^

This is only normal. I'm thinking the same about my implementation :-))

But that's easy to change really :)

Like I said I was also waiting for some patches, would like 
to get those in 
before any integrating :)

I can wait :-)

I still think we need a cvs somewhere for this thing btw. ^.^

I even found a bug that we share in our code (I think it's a
bug): the xmlTextWriter allows for multiple xml prologs 
in the same
document (you can call xmlTextWriterWriteStartDocument 
after calling
xmlTextWriterWriteEndDocument), which in my opinion does 
not conform
with the xml standard.

  Hum, the big problem is that if you serialize multiple documents
on a single stream, an XML parser reading it has no way to 
detect the
end of a document. This open the door to more troubles then it's
useful IMHO.

I basicly just followed the .net specification I think :) 
which seems to 
allow it, but I'm not sure of that :)

I checked it with and it seems to me
that it is as I said.

Yup, read what I wrote on the topic ^-^

Done :-)

So, lets see if we can come up with an integrating scheme ? :)
If you think you can get any good bits from my code and make 
a single version 
with that that'll be fine with me too :)

Let's try.

From a quick look I believe you didn't have arguments 
implemented yet ?

Did you mean attributes? In that case I did implement them (the functions called xmlTextWriterWriteProp and 
so on).

Was interesting to see you did printf like functions btw. :) 
are those safe 
for overflows and such ?

They use vsnprintf internally, so they are safe for buffer overflows. I did a little searching and found out 
that vsnprintf isn't very portable (different implementations return different values for the same errors). 
So I will have to fix that.
Output truncating if the buffer is too small is still a problem, so I will have to call vsnprintf in a loop 
until it returns a value less than the size of the buffer.
And if vsnprintf returns a negative value, errno should be checked, of course... you never know what errors 
you can get :-(

does any other part oflixml use printf like functions anyways ?

I saw an xmlStrPrintf mentioned on the list not so long ago (obviously) :)

Servus -- Alfred

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