Questions tagged [libxml2]

Software library for parsing XML documents.

libxml2
391 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
1 answer
542 views

Distribute Universal framework written in Swift

I'm facing the issue with distributing compiled swift framework. My framework heavily relies on the libxml2 dynamic library. In order to avoid issues with Swift module compatibility, I've set build ...
Aliaksandr B.'s user avatar
6 votes
1 answer
1k views

How to obtain an xmlBuf for use with xmlBufGetNodeContent/xmlBufNodeDump etc.?

The description of xmlNodeDump() (which takes an xmlBufferPtr) states: Since this is using xmlBuffer structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() instead. Fair ...
maxschlepzig's user avatar
  • 37.4k
5 votes
0 answers
5k views

is there any way to install libxml2 on windows?

I'm working with a legacy project, and I need to install a libxml2 compatible with python 3.X I need to use lxml 4.1.1, I tried to work with Christoph Gohlke's Window binaries https://www.lfd.uci.edu/...
Raul Quinzani's user avatar
4 votes
0 answers
2k views

Cannot install libxml2 on python - Linux/Windows

I am new to python and am trying to use the libxml2 package. This is what I get: Executed command: pip install libxml2-python Error occurred: Non-zero exit code (1) Command output: Collecting ...
SteveM's user avatar
  • 41
4 votes
1 answer
920 views

How do I tell libxml-ruby about external entity files?

I'm trying to validate using libxml-ruby's DTD#validate, but I keep getting the following warnings: Warning: failed to load external entity "xhtml-lat1.ent" at :29. Warning: failed to load external ...
James A. Rosen's user avatar
4 votes
2 answers
6k views

Example for parsing (X)Html with libxml2 in iOS

Recently I started to play around with the libxml2 lib within an iOS iPhone project. I read some useful links, like: http://laurentparenteau.com/blog/2009/12/parsing-xhtml-in-c-a-libxml2-tutorial/ ...
tapmonkey's user avatar
  • 141
3 votes
0 answers
158 views

How to use libxml2 on windows?

I want use this lib in my project: https://github.com/terminalstatic/go-xsd-validate I try to use debug is vscode on Windows. Now i am getting this error: Build Error: go build -o ...\service\...
ragarac3's user avatar
3 votes
1 answer
174 views

Well-formed <script>Javascript</script> tags confuse Nokogiri::HTML in STRICT mode

Here's the test case illustrating the problem: def test_strict_Nokogiri html = "<script> $('<a></a>') </script>" doc = Nokogiri::HTML(html, nil, nil, Nokogiri::XML::...
Phlip's user avatar
  • 5,325
3 votes
2 answers
3k views

How to cross compile libxml2 with arm-linux-gnueabihf-gcc compiler. How to cross compile using third party libraries?

when I tried to cross compile I am getting an error /usr/include/libxml2/libxml/encoding.h:31:26: fatal error: unicode/ucnv.h: No such file or directory compilation terminated.
jayx's user avatar
  • 103
3 votes
1 answer
547 views

Installing GTK+ on macOS Sierra 10.12.3 - libxml2 Issue

I'm having a very similar issue as described in the following post while trying to download GTK: installing gtk+ on mac osx 10.11.4 El-Capitan I am following these instructions: ./gtk-osx-build-...
Sarah's user avatar
  • 107
3 votes
1 answer
554 views

Installing nokogiri 1.6.6.2 with Babun gives error 'libxml2 version 2.6.21 or later is required!'

I'm trying to get Ruby on Rails (Ruby 2.0.0p598, Rails 4.2.0) working on Babun. I've been following this tutorial: http://xjlin0.github.io/tech/2015/04/14/babun-the-new-cygwin-for-ruby-rails-sinatra-...
Hite's user avatar
  • 31
3 votes
0 answers
355 views

libxml2 is not able to parse external/internal entity from xml string in c++?

I'm parsing xml string using libxml2 SAX API's. Following is xml string contains external entity: string xmlString= "<?xml version="1.0" standalone="no" ?><!DOCTYPE copyright [ <!ELEMENT ...
balaji's user avatar
  • 1,105
3 votes
1 answer
729 views

Validating DTD-String with Nokogiri

I am switching from LibXML to Nokogiri. I have a method in my code to check if an xml document matches an Dtd. The Dtd is read from a database (as string). This is an example within an irb session ...
krissi's user avatar
  • 253
3 votes
0 answers
1k views

cross compile libxml2 for android has build errors

I am trying to cross compile libxml2 for android , since libxml need icu4c headers , Downloaded from the link https://github.com/android/platform_external_icu4c and included the unicode headers and ...
user2245568's user avatar
3 votes
0 answers
628 views

libxml++ C++ find node by name

I am parsing xml files from wikimedia using libxml++. I have been able to use the textparser to push the text from all nodes onto a stack, but I want to specifically grab text between the page and /...
Trent Kinterbottom's user avatar
3 votes
1 answer
2k views

libxml2 convert a node and all it's contents to a raw xml string

I would like to convert a node and all it's content and children to a string. for example I have this node <node i="a"> <child1>azerty</child1> <child2>qwerty</child2&...
user655561's user avatar
3 votes
1 answer
2k views

How to ignore CDATA tags?

I'm trying to make an html parser, but when I load the html I get warnings like this Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Invalid char in CDATA 0x1C in Entity, line: 1302 Here is ...
nope's user avatar
  • 1,060
3 votes
0 answers
2k views

libxslt compilation error: undefined reference to `xmlXPathContextSetCache'

I am trying to install libxml and libxslt on my Linux machine. I already installed libxml2-2.7.8 in /flocal/apps/libxml2-2.7.8. When I install libxslt-1.1.26, I get an error. This is the steps I ...
user1288954's user avatar
3 votes
0 answers
3k views

libxml2 HTML Parse, document from HtmlReadFile() always has a root header of (null)

I'm trying to use libxml to parse through some HTML. Here's my code: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <libxml/HTMLparser.h> htmlDocPtr ...
Nacho Sam's user avatar
2 votes
0 answers
153 views

Using Perl and XML::LibXML::PrettyPrint, how do I preserve whitespace around inline processing instructions?

The PrettyPrint documentation states: "Comments and processing instructions default to being compact, but you can make particular comments or PIs inline or block by passing appropriate callbacks ...
Yuribashi's user avatar
2 votes
0 answers
72 views

PHP: How to prevent url from being converted to HTML entities when using DOMDocument loadHTML

I have the code below: $html = '<!doctype html><html><head><meta charset="utf-8"></head><body><p>Hello <a href="https://www.example.com?<%= email%>"&...
superfive33's user avatar
  • 1,124
2 votes
0 answers
813 views

Xpath current() in Yang

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 ...
Ram's user avatar
  • 341
2 votes
0 answers
113 views

perl with libxml silently crashing in Windows 10 inside loop with fork

I'm using perl 5.24.4 under Windows 10 that have the latest LibXML installed (2.0134). Below is the code that crashes on Windows 10 (It works on Linux) crash.pl use strict; use warnings; use XML::...
Demeter P. Chen's user avatar
2 votes
1 answer
2k views

Error libxml-2.0 not found when installing ggiraph

Trying to install R package ggiraph on my Mac OS X I ran into a problem with dependency xml2. This seems to be a fairly common problem for users of this and other packages so after reading threads ...
pengzell's user avatar
2 votes
0 answers
97 views

R xml2 using XPath3.0

I would just like to know if xml2 R package will eventually use XPath3.0 instead of XPath1.0? I know the package is built on top of the libxml2 C library, which still use Xpath1.0, but I can't find if ...
J.P. Le Cavalier's user avatar
2 votes
0 answers
576 views

AWS EB libxml2 and libxslt error

As some background, I am running macOS, and am deploying Python apps to AWS Elastic Beanstalk (EB). My app does not require libxml2-devel or libxslt-devel to run on locally, but when pushed to ...
Fireycold's user avatar
2 votes
0 answers
2k views

How to configure libXML with CMake?

I have learned the basics of C++ programming and thought of ways how I could proceed, in order to practise. One thing that caught my interest was Web Scraping. Since I only knew BeautifulSoup, I ...
El3ctroGh0st's user avatar
2 votes
1 answer
241 views

Automatically detecting XML or plain text input with file and STDIN with Perl

What is the most Perly way to detect XML (using XML::LibXML / libxml2) or plain text input with Perl (5.18 or higher)? I have a program that can accept plain text input or XML input, and the XML ...
Sean 'SeanTek' Leonard's user avatar
2 votes
0 answers
1k views

Can't install package XML -- issue with libxml2 libraries after upgrading to R 3.3

I am getting the following error when trying to install XML: ** testing if installed package can be loaded Error : .onLoad failed in loadNamespace() for 'XML', details: call: dyn.load(file, DLLpath ...
Ian Fiddes's user avatar
  • 2,911
2 votes
0 answers
56 views

How to use xmlHashScan function in libxml2 (c programming)

Can anyone tell me how to use the xmlHashScan function and the xmlHashScanner fucntion in the library libxml2 ? I have read the libxml2 doc for these two functions but it doesn't cotain enough ...
cheater's user avatar
  • 93
2 votes
0 answers
2k views

C - libxml2 - Updating XML element values and attributes

I am trying to update an XML document using C and the libxml2 library. I would like to selectively based on some configured values update an XML element and/or an attribute. It looks like I can use ...
Yos's user avatar
  • 393
2 votes
0 answers
126 views

libxml to stdout when using fastcgi Library

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 ...
blankabout's user avatar
  • 2,607
2 votes
0 answers
571 views

Multiple include paths (-I) for g++ in Eclipse and MinGW

I am using Eclipse Luna in a Windows environment to write programs in C++. I compile with MinGW. I am also using OpenCV and libxml2. My programs get compiled with these include paths: g++ "-IC:\\...
PDog's user avatar
  • 76
2 votes
0 answers
1k views

Building libxml2-2.9.2 for iOS 64 bit

So far I was building libxml2-2.9.2 and previous versions for iOS 32 bits only. The command I'm using to call configuration script is: ./configure --with-debug=no --host=arm-apple-darwin12.5.0 --with-...
marcin's user avatar
  • 125
2 votes
0 answers
736 views

How to create text node in libxmljs

I have searched the documentation at https://github.com/polotek/libxmljs/wiki but fails to find out how to create plain text nodes. Here is my node.js code: var libxmljs = require('libxmljs'); var ...
Lilleman's user avatar
  • 7,751
2 votes
0 answers
484 views

extracting data from 2 xml tags(opening and ending) using libxml2 xpath

This is the tag in XML <content>The Avengers</content> I want to take out "The Avengers" from the tag using xpath from libxml2 in C++ Here is my code xmlXPathObject * xpathObj = ...
user avatar
2 votes
0 answers
36 views

Python Libxml2 parseFile intermittently fails after OS upgrade

We have a set of legacy python web applications that have been running on a Debian Lenny (production) server for years. We have recently cloned that server and upgraded the clone to Wheezy. The web ...
lsiochi's user avatar
  • 21
2 votes
0 answers
113 views

create phonegap plugin with libxml2 dependency

i am trying to create plugin as described. the plugin should use static lib that i create which depends on libxml2. I have added libxml2.dylib to plugin.xml as described in phonegap plugin spec page ...
user2339638's user avatar
2 votes
1 answer
1k views

perl convert xsd to xml

Working on this for hours now, and even with this tutorial, posted by saberworks in another similar question, I don't get it to work ... So, I am trying to convert .xsd files into xml structures that ...
Jonas93's user avatar
  • 21
2 votes
0 answers
786 views

How to use XML without the libxml PHP extension

Is it possible to parse an XML file without the libxml extension (included with a PHP installation by default)? There is of course, a possibility to write a XML parser myself, but that will cost me ...
Tim Visée's user avatar
  • 3,120
2 votes
0 answers
183 views

Get invalid node libxml

I'm using DOMDocument's schemavalidate method to validate a XML and libxml_get_errors to get all the errors. Is there a way to 'find' the element in the XML that causes an error? Currently the ...
Mart Blegger's user avatar
2 votes
0 answers
161 views

Cannot include libxml2 in my framework, can I include its source code?

I am creating a framework for iOS in objective-c with X-Code. This framework uses the library libxml2 that I can not include with the framework itself (simply it is not possible for frameworks). Then ...
Massimo's user avatar
  • 3,464
2 votes
1 answer
629 views

Hpple not able to parse HTML

I'm using Hpple to parse HTML and it seems that it doesn't recognize it is actually XML, which it should (XCode debugger shows this variable isXML = (BOOL) NO and it doesn't collect any data). How do ...
sinθ's user avatar
  • 11.3k
2 votes
0 answers
680 views

libxml2 with default sax handler and custom error handler

I would like to use a simple libxml2 parser in a C++ program the following way: default sax handler is fine (actually I'd like to avoid the effort of writing my own. I understand that I can do what I ...
tge's user avatar
  • 91
2 votes
1 answer
2k views

ld: library not found for -lxml2 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am using libxml2 framework in my application. But it is showing this error: ld: library not found for -lxml2 clang: error: linker command failed with exit code 1 (use -v to see invocation) I also ...
Rachit's user avatar
  • 1,189
2 votes
1 answer
5k views

Compiling ICU Library for Android

I wanted to compile libxml2 for my Android Project, but it seems that libxml2.so requires libicu.so to function correctly. I saw a couple of sites about how to compile and create libicu.so file. I ...
Nathan's user avatar
  • 674
2 votes
0 answers
5k views

Simple libxml2 XML parsing example with Obj-C, Xcode and libxml2?

Could somebody give me an example of parsing a XML file using libxml2 please ? <item> <title>Turtle</title> <type>Reptile</type> </item> <item> &...
Rob's user avatar
  • 15.9k
2 votes
1 answer
341 views

How to add xml-stylesheet tag in a XML File using libxml2?

I'd like to know how I could insert the special tag <?xml-stylesheet type="text/xsl" href="XYZ.xslt"?> in a document, just after the <?xml version="1.0" ... ?> and before the Doc root ...
mujahid's user avatar
  • 701
2 votes
1 answer
469 views

Getting compressed buffer in memory in libxml2

I'm using libxml2 with zlib support. I'm trying to get a compressed XML buffer in memory. I've already tried xmlSaveFormatFileTo(), xmlSaveToBuffer() and different xmlDocDump...() functions. They all ...
Andrew's user avatar
  • 81
2 votes
0 answers
2k views

libxml reader: How do I read attribute value such that the entity reference are preserved?

I'm using the libxml2 streaming reader and I am having trouble reading entity references. When an entity reference is within an elements contents it is treated as a node of type ...
Benedict Cohen's user avatar

1
2 3 4 5
8