libxml2

Cannot install XML package in R/RStudio

随声附和 提交于 2019-12-12 13:00:16
问题 [Environment: macOS 10.12.6, RStudio 1.1.383, R 3.4.2 (via homebrew)] Please note this is not a duplicate of this question - solutions there do not work for me. I am getting install errors when I attempt to install the XML package in RStudio: > install.packages("XML") Installing package into ‘/usr/local/lib/R/3.4/site-library’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/src/contrib/XML_3.98-1.9.tar.gz' Content type 'application/x-gzip' length 1599437 bytes (1.5 MB) ========

“undefined symbol: __xmlStructuredErrorContext” importing etree from lxml

允我心安 提交于 2019-12-12 12:28:46
问题 >>> import lxml >>> from lxml import etree Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: /usr/local/lib/python3.4/site-packages/lxml/etree.cpython-34m.so: undefined symbol: __xmlStructuredErrorContext i do have libxml2 and libxslt, i have tried uninstalling and reinstalling too, it didn't help. lxml version: 3.4.4, python: 3.4.2, OS: RHEL 5.5 Please help resolve this issue Thanks 回答1: Your version of lxml.etree was compiled against a different version of

using perl XML::LibXML to parse

坚强是说给别人听的谎言 提交于 2019-12-12 12:24:39
问题 I am using perl's XML::LibXML module to parse an XML response from a device. It appears that the only way I can successfully get my data is by modifying the XML response from the device. Here is my XML response from the device: <chassis-inventory xmlns="http://xml.juniper.net/junos/10.3D0/junos-chassis"> <chassis junosstyle="inventory"> <name>Chassis</name> <serial-number>JN111863EAFF</serial-number> <description>VJX1000</description> <chassis-module> <name>Midplane</name> </chassis-module>

What version of XPath is implemented in XML::LibXML?

一世执手 提交于 2019-12-12 11:15:48
问题 Does anybody know which version of the XPath specification has been implemented in XML::LibMXL? Or more to the point, where can I find a description of the XPath functions that I can use in LibXML? For example, I tried something like $dcDOM->findvalue('//dc:identifier[contains(@xsi:type,"URI")]'); which seems to work fine, but $dcDOM->findvalue('//dc:identifier[matches(@xsi:type,"URI")]'); does not. From that one has to assume that it supports at most XPath 1.0 or some subset of 1.0/2.0 . Is

What's wrong with this findnodes statement in my Perl's script?

喜你入骨 提交于 2019-12-12 10:43:28
问题 I have a simple xml file that looks like this: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <microplateDoc xmlns="http://moleculardevices.com/microplateML"> <camelids> <species name="Camelus bactrianus"> <common-name>Bactrian Camel</common-name> <physical-characteristics> <mass>450 to 500 kg.</mass> <appearance> Blah blah blah </appearance> </physical-characteristics> </species> </camelids> </microplateDoc> I'm trying to read the species names with the following perl script: use

How do you use the --pattern option of xmllint?

余生颓废 提交于 2019-12-12 10:29:15
问题 I'm trying to see how libxml implements XPath support, so it made sense to me to test using xmllint. However, the obvious option, --pattern, is somewhat obscure, and I ended up using something like the following: test.xml: <foo><bar/><bar/></foo> > xmllint --shell test.xml / > dir /foo ELEMENT foo / > dir /foo/* ELEMENT bar ELEMENT bar This seems to work, and that's great, but I'm still curious. What is xmllint's --pattern option for, and how does it work? Provide an example for full credit.

libxml2 vs expat for an XMPP server

情到浓时终转凉″ 提交于 2019-12-12 08:03:13
问题 I'm trying to create an XMPP library (and later a server) from scratch in Go (although the language itself is irrelevant) as a means to learn what I can about the XMPP protocol and server software development in general. As many of you know, XMPP is messaging protocol based on XML that depends on an enormous amount of short but frequent XML streams. I'm thinking that for such applications an event based XML parser should be better because I won't need DOM and all that (correct me if I'm wrong

how to save XML to a file (filename.xml) using libxml2 ?

我是研究僧i 提交于 2019-12-12 04:49:52
问题 I've configured libxml2 with " --with-minimum -with--schemas " switches (configuration options). I am using "xmlNewNode" "xmlAddChild" etc. functions to generate the XML file. Now, i want to save the XML to a file, but i didn't find any function to do that. Of-course, there are plenty of functions (like xmlSaveFile() etc..) in "libxml2 full version" BUT as i said i've configured it with --minimum configuration option (b/c of memory constraints). Any one with help ? Thanks ! 回答1:

undefined reference to gzdopen, gzclose, gzread

一曲冷凌霜 提交于 2019-12-12 04:45:12
问题 I have compiled and installed the 2.2.7.2 version of libxml. While compiling, I have this error: Makefile:755: recipe for target 'install-data-local' failed. But the lib files are correctly generated (libxml2.a and libxml2.so). I'd like to use libxml2 in a C project so I edited my makefiles in order to integrate lib files (libxml2.a and libxml2.so). The problem is that when I compile my project I get the followings errors: /libxml2.a(xmlIO.o): In function xmlGzfileRead': undefined reference

Python XPath / libxml2 namespace query

百般思念 提交于 2019-12-12 04:19:09
问题 I have been trying to parse the London Underground Linestatus XML "feed" - with little success. I would have expected this to ne "easy" using XPath, but I am getting empty nodes. I am fairly sure sure that I am not dealing with the uk namespace correctly. Here is my (rather simple code): import libxml2 from urllib2 import urlopen data = urlopen('http://cloud.tfl.gov.uk/TrackerNet/LineStatus').read() try: doc = libxml2.parseDoc(data) except (libxml2.parserError, TypeError): print "Problems