Re: [xml] Signing XML PLEASE HELP

2008-07-10 Thread Andrew Hartley
I have solved this now. The code I posted was correct after all. Turned out that the source XML document had one char wrong in the href of the node!!! -- View this message in context: http://www.nabble.com/Signing-XML-PLEASE-HELP-tp18358565p18379026.html Sent from the Gnome - Lib - Xml - Gene

[xml] Get sub-document from xmlDocPtr

2008-07-17 Thread Andrew Hartley
Having extracted a sub-document with an XPath expression and now have an xmlXPathObjectPtr is there a simple way to output the sub-document into a new xmlDocPtr so that this sub-document can then be saved to disk? -- View this message in context: http://www.nabble.com/Get-sub-document-from-xmlDo

Re: [xml] Get sub-document from xmlDocPtr

2008-07-17 Thread Andrew Hartley
Andrew Hartley wrote: > > Having extracted a sub-document with an XPath expression and now have an > xmlXPathObjectPtr is there a simple way to output the sub-document into a > new xmlDocPtr so that this sub-document can then be saved to disk? > It's ok, I have w

Re: [xml] Get sub-document from xmlDocPtr

2008-07-17 Thread Andrew Hartley
Daniel Veillard wrote: > > On Thu, Jul 17, 2008 at 03:25:20AM -0700, Andrew Hartley wrote: >> >> >> Andrew Hartley wrote: >> > >> > Having extracted a sub-document with an XPath expression and now have >> an >> > xmlXPathObjectPtr i

Re: [xml] Get sub-document from xmlDocPtr

2008-07-17 Thread Andrew Hartley
Daniel Veillard wrote: > > On Thu, Jul 17, 2008 at 06:13:53AM -0700, Andrew Hartley wrote: >> Thanks for the reply Daniel. However, I only wanted to explain that I >> had >> solved the problem. Here is a little more of my code just in case others >> have the sa

Re: [xml] Get sub-document from xmlDocPtr

2008-07-18 Thread Andrew Hartley
Daniel, I am sure I had this working! But yes xmlSubDoc == xmlDoc. How can I save the nodeset as an XML document in its own right? Andy Daniel Veillard wrote: > > On Thu, Jul 17, 2008 at 06:13:53AM -0700, Andrew Hartley wrote: >> Thanks for the reply Daniel. However, I on

Re: [xml] Get sub-document from xmlDocPtr

2008-07-18 Thread Andrew Hartley
You're a start, thank you. BTW - this is an excellant library. I have been using it for the last 3 weeks and slowly getting used to it. Brilliant. Daniel Veillard wrote: > > On Fri, Jul 18, 2008 at 01:51:41AM -0700, Andrew Hartley wrote: >> >> >> Daniel

[xml] xmlReadMemory : error "Extra content at the end of the document"

2008-11-13 Thread Andrew Hartley
I have written a DLL with a large (size = 1318109 chars) XML stored as a resource. I read the XML into a std::string and load it with a call to xmlReadMemory: xmlDocPtr pXmlDoc = xmlReadMemory(sXml, sXml.length(), "xml", NULL, 0); This works fine in Debug mode. But when I switch to Release mod

Re: [xml] xmlReadMemory : error "Extra content at the end of the document"

2008-11-14 Thread Andrew Hartley
they will know how to resolve it. Elvis Stansvik wrote: > > Hi, > > First of all, please always state your platform and libxml2 version > when asking for help. Also provide a complete standalone code example > of your problem. > > 2008/11/13 Andrew Hartley <[EMAI

Re: [xml] xmlReadMemory : error "Extra content at the end of the document"

2008-11-14 Thread Andrew Hartley
for this I will just have to check for it and strip these extra PADing chars off. Andrew Hartley wrote: > > I have written a DLL with a large (size = 1318109 chars) XML stored as a > resource. I read the XML into a std::string and load it with a call to > xmlReadMemory: > >

Re: [xml] xmlReadMemory : error "Extra content at the end of the document"

2008-11-14 Thread Andrew Hartley
AfxMessageBox("Unable to locate Xml end tag in Taxonomy resource!"); } Elvis Stansvik wrote: > > 2008/11/14 Andrew Hartley <[EMAIL PROTECTED]>: >> >> Having streamed the std::string content (the Xml) to file in Debug mode >> and >>

[xml] Parsing XML with huge text nodes

2009-12-07 Thread Andrew Hartley
I am using LibXml2 v2.7.6 and parsing an XML document that has a couple of huge text nodes, approx 16MB. I see that there is an option of setting a context option to XML_PARSE_HUGE. I would appreciate if someone could let me know where I need to set this. Here is a snippet of my code: xmlLoadE

[xml] xmlReadFile(...) crashing on 2nd time around

2009-12-10 Thread Andrew Hartley
This is my code to read an XML file, which works fine the 1st time around, but crashes the 2nd time around. I must be not calling a required library function to tidy up and would appreciate if someone could advise on what I should do. If I debug, the 1st time around xmlReadFile takes hardly any

Re: [xml] xmlReadFile(...) crashing on 2nd time around

2009-12-11 Thread Andrew Hartley
Martin (gzlist) wrote: > > On 10/12/2009, Andrew Hartley wrote: >> >> This is my code to read an XML file, which works fine the 1st time >> around, >> but crashes the 2nd time around. I must be not calling a required >> library >> function to tid

Re: [xml] xmlReadFile(...) crashing on 2nd time around

2009-12-14 Thread Andrew Hartley
xmlCleanupParser() I no longer get the crash. I would appreciate if anyone can let me know why I no longer get the crash. Do I need to call anything other than xmlCleanupParser(). Of course I am freeing the xmlDocPtr and contexts correctly. Martin (gzlist) wrote: > > On 10/12/2009, Andrew H

[xml] XML validation using Schematron using LibXml2?

2009-12-16 Thread Andrew Hartley
Is it possible yet with the latest libxml2 build to validate an XML document using a Schematron? If so can you update the LibXml2 web site to show code examples of how you go about doing this please? If this is not yet possible, do you you know when this is likely to be fully implemented? -- Vi

[xml] Validating XML file against XSD Schema

2010-05-06 Thread Andrew Hartley
Would someone please let me know how I can validate an XML file against its XSD Schema file. If there are validation errors I would then like to extract the human readable error description. -- View this message in context: http://old.nabble.com/Validating-XML-file-against-XSD-Schema-tp28471453

Re: [xml] Validating XML file against XSD Schema

2010-05-06 Thread Andrew Hartley
Thanks for the help. I now get the following output from xmllint: "Element 'http://old.nabble.com/Validating-XML-file-against-XSD-Schema-tp28471453p28476078.html Sent from the Gnome - Lib - Xml - General mailing list archive at Nabble.com. ___ xml ma

[xml] xmlNodePtr properties missing xmlns:xxxx

2011-06-23 Thread Andrew Hartley
I have an iXBRL document that I am parsing with LibXml2. The problem I have is that I register all the namespaces which are mostly held in the root node, no problem. But, there are some namespace declarations in some of the document nodes as attrbutes of that particular node. When I get the at

Re: [xml] xmlNodePtr properties missing xmlns:xxxx

2011-06-24 Thread Andrew Hartley
Thank you both. I have solved the problem thus: void CXbrl::RegisterNamespaces(xmlDocPtr pXmlDoc, xmlXPathContextPtr pXPathCtx) { m_mNamespaces.clear(); RegisterNamespaces(pXmlDoc->children, pXPathCtx); } void CXbrl::RegisterNamespaces(xmlNodePtr pNode,

[xml] libxml2-2.9.3 - generating a def file

2016-09-09 Thread Andrew Hartley
I have built libxml2-2.9.3 on Windows 10 with Visual Studio 2010, but I'm having difficulty generating a .def file for all the exported functions from the .dll that I build. When I run dumpbin on the .dll it only creates the following: Dump of file libxml2.dll File Type: DLL Summary

[xml] libxml2-2.9.3 - generating a def file

2016-09-09 Thread Andrew Hartley
I have built libxml2-2.9.3 on Windows 10 with Visual Studio 2010, but I'm having difficulty generating a .def file for all the exported functions from the .dll that I build. When I run dumpbin on the .dll it only creates the following: Dump of file libxml2.dll File Type: DLL Summary

Re: [xml] libxml2-2.9.3 - generating a def file

2016-09-09 Thread Andrew Hartley
Further to my email below. I've now found how to build the libxml2.def file for use with Visual Studio. I use the libxml2.def.scr script: ? Cl /EP libxml2.def.src > libxml2.def Which works fine. Thanks From: Andrew Sent: 09 September 2016 15:25 To: 'xml@gnome.org' Subject: libxml2-2.9.3 -