Re: [xml] Strange validation errors in libxml 2.9.0 with MSVC 2010

2013-04-28 Thread GMail
Hi, thanks for checking in. As far as I know, there is no solution for this problem yet. Daniel recommended to debug into xmllib to find out what the problem might be - I simply don't have the bandwidth to do that. So, I opted for avoiding the problem as a whole by downgrading to 2.8.0. I guess

Re: [xml] Strange validation errors in libxml 2.9.0 with MSVC 2010

2013-04-28 Thread GMail
Hi, not a lot of help I know, but this is all I have to offer right noww. I think, Ubuntu does upgrades pretty well. I have upgraded from 9.x to 12.x each release (have not tried 13.x yet) and I had only one minor problem (with grub), so I'd like to think you can rule out the upgrade issue. But,

[xml] C++11 binding for libxml

2013-04-28 Thread Sam Varshavchik
Howdy, The existing C++ bindings for libxml, the libxmlplusplus library, seem to support, basically, just parsing an existing XML document. I've been working on C++11 bindings that provide a more complete, thread-safe tree, parser, entities, xmlsave, and xpath API coverage:

[xml] libxml2 API crazy?

2013-04-28 Thread Nikita Churaev
#include libxml/parser.h #include libxml/tree.h #include stdio.h int main (int argc, char** argv) { xmlDocPtr doc = xmlReadMemory(doc/, 6, egg.xml, NULL, 0); /* XmlNode *//* XmlDoc */ printf(%s\n, (doc-children-parent == doc) ? true : false); return 0; }

Re: [xml] libxml2 API crazy?

2013-04-28 Thread Nikolay Sivov
On 4/29/2013 07:30, Nikita Churaev wrote: #include libxml/parser.h #include libxml/tree.h #include stdio.h int main (int argc, char** argv) { xmlDocPtr doc = xmlReadMemory(doc/, 6, egg.xml, NULL, 0); /* XmlNode *//* XmlDoc */ printf(%s\n,

Re: [xml] libxml2 API crazy?

2013-04-28 Thread Nikita Churaev
No it's not. http://xmlsoft.org/html/libxml-tree.html#xmlDoc http://xmlsoft.org/html/libxml-tree.html#xmlNode xmlDoc has int compression instead of xmlNode's xmlNs On Mon, 2013-04-29 at 07:48 +0400, Nikolay Sivov wrote: On 4/29/2013 07:30, Nikita Churaev wrote: #include libxml/parser.h

Re: [xml] libxml2 API crazy?

2013-04-28 Thread Nikolay Sivov
On 4/29/2013 07:59, Nikita Churaev wrote: No it's not. http://xmlsoft.org/html/libxml-tree.html#xmlDoc http://xmlsoft.org/html/libxml-tree.html#xmlNode xmlDoc has int compression instead of xmlNode's xmlNs I see what you mean. All node types are using same layout containing basic stuff to

Re: [xml] libxml2 API crazy?

2013-04-28 Thread Nikita Churaev
Is this allowed by the C standard? And where is this documented? On Mon, 2013-04-29 at 08:14 +0400, Nikolay Sivov wrote: On 4/29/2013 07:59, Nikita Churaev wrote: No it's not. http://xmlsoft.org/html/libxml-tree.html#xmlDoc http://xmlsoft.org/html/libxml-tree.html#xmlNode xmlDoc

Re: [xml] libxml2 API crazy?

2013-04-28 Thread Nikolay Sivov
On 4/29/2013 08:18, Nikita Churaev wrote: Is this allowed by the C standard? And where is this documented? It doesn't have anything to do with C standard. Not sure if it's documented anywhere, you have headers with all that info, personally I just read lib code if in doubt. On Mon,

Re: [xml] libxml2 API crazy?

2013-04-28 Thread Nikita Churaev
It doesn't have anything to do with C standard. It does. Take for example: struct A { int q; int w; /* end of common part */ float x; }; struct B { int q; int w; /* end of common part */ double x; }; What if the C standard allows the compiler to place q and w further apart

Re: [xml] libxml2 API crazy?

2013-04-28 Thread Liam R E Quin
On Mon, 2013-04-29 at 08:32 +0400, Nikita Churaev wrote: It doesn't have anything to do with C standard. It does. Take for example: struct A { int q; int w; /* end of common part */ float x; }; struct B { int q; int w; /* end of common part */ double x; };

Re: [xml] libxml2 API crazy?

2013-04-28 Thread Callum Gibson
On 29Apr13 08:32, Nikita Churaev wrote: } It doesn't have anything to do with C standard. } }What if the C standard allows the compiler to place q and w further }apart in struct A than in struct B? Then if you cast struct A *a into }struct B *b, you'll get garbage in b-w. See KR II (ie. the ANSI