libxml2

Can I incorporate system libraries (e.g. libxml2) I compile against into a gem (e.g. nokogiri) that I can deploy to Heroku?

倾然丶 夕夏残阳落幕 提交于 2019-12-21 12:12:28
问题 Nokogiri has a problem with translating to and from UTF-8 characters that turns out to come from libxml2, specifically version 2.7.6, which is the highest supported version on Ubuntu 10.04 LTS. The bug is fixed in version 2.7.7 and up, but since our app is hosted on Heroku (bamboo-ree-1.8.7 stack, based on Ubuntu 10.04), we have to use version 2.7.6, and continue to experience the bug, unless: Someone can/has hacked nokogiri to get around the problem Canonical bumps the supported libxml2

Fast and effective way to parse broken HTML?

空扰寡人 提交于 2019-12-21 06:08:08
问题 I'm working on large projects which require fast HTML parsing, including recovery for broken HTML pages. Currently lxml is my choice, I know it provides an interface for libxml2's recovery mode, too, but I'm not really happy with the results. For some specific HTML pages I found that BeautifulSoup works out really better results (example: http://fortune.com/2015/11/10/vw-scandal-volkswagen-gift-cards/, this one has a broken <header> tag which lxml/libxml2 couldn't correct). However, the

libxml-ruby: Failed to build gem native extension

被刻印的时光 ゝ 提交于 2019-12-20 18:31:56
问题 I'm trying to install libxml-ruby . I have installed libxml2 , libxslt and coreutils I have also read other posts regarding the issue but none solved it for me. brew list libxslt /opt/boxen/homebrew/Cellar/libxslt/1.1.28_1/bin/xslt-config /opt/boxen/homebrew/Cellar/libxslt/1.1.28_1/bin/xsltproc /opt/boxen/homebrew/Cellar/libxslt/1.1.28_1/include/libexslt/ (3 files) /opt/boxen/homebrew/Cellar/libxslt/1.1.28_1/include/libxslt/ (21 files) /opt/boxen/homebrew/Cellar/libxslt/1.1.28_1/lib/libexslt

XSLT 1.0 (xsltproc) - Unable to Parse Huge XML

筅森魡賤 提交于 2019-12-20 03:54:14
问题 The bounty expires in 3 days . Answers to this question are eligible for a +50 reputation bounty. InsecureNoob wants to draw more attention to this question: “Just a fix for the error needed. Bounty guaranteed” I am trying to parse an input xml file that is 13,00,000 lines long with a size of 56 MB, using xsltproc. I get the below error: input.xml:245393: parser error : internal error: Huge input lookup "description" : "List of values for possible department codes" ^ unable to parse input.xml

How to Integrate libxml2 native lib in Android-NDK project using CMakeLists.txt and AndroidStudio?

 ̄綄美尐妖づ 提交于 2019-12-20 02:46:29
问题 Please assist me for using libxml2 native-lib - XML parsing library in Android NDK using CMakeLists.txt configuration. I found a source here. But do not know how to integrate this using CMakeLists.txt in AndroidStudio . And what need to include from this repository in my android-NDK project to use libxml2? 回答1: After some search and effort i found some solution. So i would like to answer my own question in following steps : Clone the source from android/platform_external_libxml2 in your

xml indentation

只谈情不闲聊 提交于 2019-12-19 18:26:16
问题 I am writing an xml file using the xmlwriter api of libxml2. when I open the file using notepad, the indentation isn't right. does anybody know how to fix it? thanks a whole lot. 回答1: I'm going on a bit of a limb here, but I'll say that by "the indentation isn't right" you mean it isn't indented at all. libxml2, by default, won't indent your XML file, because in XML, whitespace (including that used for indentation) is significant data. That is, this XML file: <root> <foo>Bar</foo> </root> is

Opening import file for module 'Swift': Not a directory

折月煮酒 提交于 2019-12-19 17:47:46
问题 After following the instructions here to setup libxml on Swift: libxml/tree.h no such file or directory I encountered an error while compiling which said: Opening import file for module 'Swift': Not a directory I've searched online and they recommending cleaning the project which didn't work for me. Any idea what's causing this error? 回答1: I got this error when I had an invalid path to a framework in my Framework Search Path and User Header Search Paths . I simply fixed the path by adding "

#import <libxml/tree.h> file not found after xcode 6.1 update

断了今生、忘了曾经 提交于 2019-12-19 10:12:20
问题 I am getting lexical or preprocessor issue i.e file not found after xcode 6.1 update. i have followed below stack overflow solution but no luck. #import <libxml/tree.h> file not found after xcode update i found libxml2.2.dylib --> it is created during xcode 5 installation. libxml2.dylib --> it is created during latest xcode6 update. Using finder /usr/lib/ I had used libxml2.2.dylib in xcode 5 but now i am getting above error in xcode 6. Also how to add libxml2.2.dylib lib from this /usr/lib/

Why does XML::LibXML find no nodes for this xpath query when using a namespace

余生长醉 提交于 2019-12-19 07:38:11
问题 I'm attempting to select a node using an XPath query and I don't understand why XML::LibXML doesn't find the node when it has an xmlns atribute. Here's a script to demonstrate the issue: #!/usr/bin/perl use XML::LibXML; # 1.70 on libxml2 from libxml2-dev 2.6.16-7sarge1 (don't ask) use XML::XPath; # 1.13 use strict; use warnings; use v5.8.4; # don't ask my ($xpath, $libxml, $use_namespace) = @ARGV; my $xml = sprintf(<<'END_XML', ($use_namespace ? 'xmlns="http://www.w3.org/2000/xmlns/"' : q{}))

Automatic XSD validation

心不动则不痛 提交于 2019-12-19 06:01:42
问题 According to the lxml documentation "The DTD is retrieved automatically based on the DOCTYPE of the parsed document. All you have to do is use a parser that has DTD validation enabled." http://lxml.de/validation.html#validation-at-parse-time However, if you want to validate against an XML schema, you need to explicitly reference one. I am wondering why this is and would like to know if there is a library or function that can do this. Or even an explanation of how to make this happen myself.