My application needs lxml >= 2.1,
but to install lxml its requied to install libxml2-dev libxslt1-dev
else it raises error while installing the lxml,
is there a way that using python setup tool I can give this as dependency in my setup.py....
...
I have XML documents like:
<rootelement>
<myelement>test1</myelement>
<myelement>test2</myelement>
<myelement type='specific'>test3</myelement>
</rootelement>
I'd like to retrieve the specific myelement, and if it's not present, then the first one. So I write:
/rootelement/myelement[@type='specific' or position()=1]
The XPath spec ...
This error comes up in Redhat Enterprise Linux Server 5.4 - 64 bit.
Linux rhl-64-tibbr5 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
There is also this error in the stack trace.
uninitialized constant Nokogiri::VERSION_INFO
More version details:
jruby-1.4.0RC1
ruby/gems/1.8/gems/activesupport-2....
I'm trying to install libxml2 on my Mac (OS 10.6.4). I'm actually trying to just run a Scrapy script in Python, which has required me to install Twisted, Zope, and now libxml2. I've downloaded the latest version (2.7.7, from xmlsoft.org) and tried following these instructions here. To summarize, I tried this command (in the python sub...
hi,
I've searched but theres no libxml2 binaries for py2.7.
I have also tried running setup.py for version py2.6.9 but it gave me the error
failed to find headers for libxml2: update includes_dir
Does anyone have a solution?
...
For an XML that has
<?xml version="1.0" encoding="utf-8"?>
<COLLADA version="1.4.0" xmlns="http://www.collada.org/2005/11/COLLADASchema">
<library_geometries>
<geometry id="Cube">
<mesh>
<source id="Cube">
<float_array count="24" ">1 2 3</float_array>
[..]
I'm getting properly "1 2 3" string with a
if (!xmlStrcmp(c...
I'm parsing HTML with libxml2, using XPath to find elements. Once I found the element I'm looking for, how can I get the HTML as a string from that element (keeping in mind that this element will have many child elements). Given a document:
<html>
<header>
<title>Some document</title>
</header
<body>
<p id="...
I'm using libxml2 to parse HTML. I want to remove certain formatting tags like <center>, while keeping their content (for example, a link).
This means I'll have to remove certain child nodes from my xmlNodeSet, but keep that node's children.
Right now, I got this code:
xmlNodePtr parentNode = nodes->nodeTab[i];
if (parentNode != NULL...
I'm using libxml2 to parse HTML. The HTML might look like this:
<div>
Some very very long text here.
</div>
I want to insert a child node, e.g. a header, in before the text, like this:
<div>
<h3>
Some header here
</h3>
Some very very long text here.
</div>
Unfortunately, libxml2 always adds my header after t...
I've heard that including libxslt.dylib is grounds for getting your app rejected. I don't know how accurate that is.
Nevertheless, I would like to include the latest version of libxslt. I'd like to do the same thing with libxml2, as well as other libraries in the future.
What is the correct way to include a code library like this in my...
Hi,
This question is somewhat related to
http://stackoverflow.com/questions/530064/fastest-xml-parser-for-small-simple-documents-in-java
but with a few more specifics.
I'm working on an application which needs to parse many (10s of millions), small (approx. 300k) xml documents. The current implementation is using xerces-j and it takes...
I'm trying to create an XMPP library (and later a server) from scratch in a new C-like programming language (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 enormo...
Hi,
I am trying to scrape some content from an HTML page. I'm using libxml2 and htmlReadMemory to get a xmlDocPtr. The HTML is simple, but it has a problem. It's basically the following:
<tr><td><tr><td>Some content</td></tr></td></tr>
libxml doesn't like the nested tr, tds. It keeps giving me the following error:
HTML parser error ...
I should be doing something wrong. What is the XPath query for all nodes named "name" under display-name? I am using libxml2.
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink...
When I use libxml2 in my ipad project (i use the dylib and add the header flags correctly) it doesn't build and gives the error:
/Xcode4/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/usr/include/libxml2/libxml/xmlversion.h:24
Expected '=','','.','asm' or 'atrribute' before 'void'.
line 23-25 of xmlversion.h ...
how do i parse an online document (xml file) in gtk, for example the url : http://www.w3schools.com/XML/note.xml contains the xml file.
...
I'm looking to replace MSXML with a library that will allow us to use DOM processing but using our own allocation, so we can assure it is mapped directly onto a memory-mapped file. This avoids having to synch the DOM back to the file. Can anyone please suggest which of the various libraries out there is most likely to be easily customise...
I use libxml2 SAXParser.
To process entering and leaving the element I use startElementSAXFunc and endElementSAXFunc procedures.
But I couldn't find procedures to process the text. For example :
Blogger
How can I get "Blogger"??
...
Hello!
I'm using xpath and LibXML in an iPhone app to find some nodes in an xml document. I'm a noob in xpath so probably i am doing something wrong.
Here is the xml:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs...
Hello all...
I am trying to parse an XML document in C++. I do not have any form of metadata associated with the document. Since i am a novice with XML's i wanted to understand the best way to parse this xml. I am using libxml2 to achive this.
What i am doing currently is
1) walking the complete tree node by node , using pointers of ...