libxml2

libxml htmlParseDocument ignoring htmlParseOption flags

≡放荡痞女 提交于 2019-12-11 07:27:59
问题 Looking for someone who uses libxml through an environment other than packaged with PHP to confirm the HTML_PARSE_NOWARNING flag is ignored. Warnings are still generated. Source code from PHP, implementing libxml in C: //one of these options is 64 or HTML_PARSE_NOWARNING htmlCtxtUseOptions(ctxt, (int)options); ctxt->vctxt.error = php_libxml_ctx_error; ctxt->vctxt.warning = php_libxml_ctx_warning; if (ctxt->sax != NULL) { ctxt->sax->error = php_libxml_ctx_error; ctxt->sax->warning = php_libxml

libxml xmlXPathEvalExpression order

一曲冷凌霜 提交于 2019-12-11 06:47:05
问题 I've started using libxml in C , and I'm using the xmlXPathEvalExpression function to evaluate XPath. My XML file actually represents a table, with each child node representing a row in that table and its attributes are the corresponding values, so the order is important. I couldn't find information about that function in regards to its order. Does it return the nodes in the document order for example, the following xml file: <?xml version="1.0" encoding="UTF-8"?> <Root> <TABLE0> <Row Item0=

Is there a possibility for cloning an xmlTextReader (or multi-pass reading)?

社会主义新天地 提交于 2019-12-11 06:37:35
问题 I currently have to fix an existing application to use something other than the DOM interface of libxml2 because it turns out it gets passed XML files so large that they can't be loaded into memory. I have rewritten the data loading from iterating over the DOM tree to using xmlTextReader for the most part now without too much problems. ( I use xmlNewTextReaderFilename to open a local file.) It turns out however, that the subtree where the large data resides has to be read not in-order, but I

How to downgrade libxml 2.7.8 to 2.7.6 in Ubuntu

限于喜欢 提交于 2019-12-11 06:25:56
问题 One of my Rubygem (Nokogiri) was bult against libXML 2.7.6, but once i upgraded libXML to version 2.7.8, my programs are giving errors. To make my programs working i need to do a lot of modifications and i don't want to do them. Can i downgrade libXML to 2.7.6 回答1: Did you try rebuilding Nokogiri to use the newer version of libxml? gem uninstall nokogiri gem install nokogiri should do it. If you installed Nokogiri using sudo originally you'll need to use it with the commands above too.

libxml to stdout when using fastcgi Library

陌路散爱 提交于 2019-12-11 04:03:52
问题 We are attempting to create an XML feed using libxml, the code to produce the output is working fine, a valid XML listing is produced, the only problem is that the output goes to the error log (by way of stderr) rather than the required web page (by way of stdout) when using the fastcgi library. The same thing occurs whether the code is run using a browser or curl. Versions/releases: Fedora: release 20 Apache: 2.4.10 fastcgi:? the latest libxml: 2 No code has been included with this question

C/C++, libxml2: parsing HTML fragments

这一生的挚爱 提交于 2019-12-11 03:33:27
问题 I need to parse real life HTML documents. In most cases they are well formed, but sometimes (and it can not be ignored) they appear as fragments having more than one sibling at the root level. Example: <div>one</div> <div>two</div> Now I use libxml2 v2.7.8 with the following parse flags: HTML_PARSE_NOERROR | HTML_PARSE_RECOVER | HTML_PARSE_NODEFDTD | HTML_PARSE_NOIMPLIED If I feed it with the above example and then dump HTML from the parsed document: <div>one<div>two</div></div> As you can

Xpath current() in Yang

旧时模样 提交于 2019-12-11 03:08:33
问题 I have a leaf defined in Yang as: leaf test-must { type int32; description "Test must"; must "current() > 0" { error-message "test-must value should be > 0"; } } Looks like the underlying library, libxml2 , I use does not recognize current() when this is evaluated and returns error: error: xmlXPathCompOpEval: function current not found error: Unregistered function Are there any alternatives to current() ? Or where do I find definition for current() and register it? As an alternative I tried

XPath current() for Yang

若如初见. 提交于 2019-12-11 00:22:25
问题 This is my follow up question for Xpath current() in Yang After the earlier discussion, I implemented a customized function current() for libxml2 with implementation shown below. The function works fine as expected when it evaluates Xpath expressions like: leaf test-string { type string; must "current() > 0"; } But when more complex expressions are involved like Xpath expresion "interface[name=current()/supporting-interface]/type = 'optical'", it does not seem to be working fine. Anything I

How to validate xml document against relaxNG schema in libxml++

萝らか妹 提交于 2019-12-11 00:11:10
问题 I'm rather new to parsing xml in c++ and to xml in general. I'm trying to parse my document with SAXParser from libxml++ library, however, I would also like it to validate my document against a relaxNG schema. I've found that libxml2, which is underneath libxml++, has a relaxNG module, but I was unable to find out how to use its libxml++ binding. Any clues or code snippets would be appreciated. 回答1: After several tries it occured to me, that there is no relaxNG wrapper in libxml++, that is

mingw/libxml2 issue

时光总嘲笑我的痴心妄想 提交于 2019-12-10 23:19:30
问题 I'm trying to use libxml2 (v2.2.6.0) with mingw under win7 I added the lib -llibmlx2, but each time I compile I get : error: undefined reference to `_imp__xmlFree' On Google I found this: http://osdir.com/ml/gnome.lib.xml.ge.../msg00003.html But still doesn't work. Any idea ? thanks... 回答1: I believe that this problem only happens when using precompiled libxml2 binaries prepared by Igor Zlatovic. I suspect that the problem goes away if using libxml2 lib natively compiled with mingw. Here is