Questions tagged [libxml2]

Software library for parsing XML documents.

libxml2 is written in the programming language, and provides bindings to , , , , / and other Pascals, , , and .

The library was originally developed as part of the GNOME project and features

Useful Links

1518 questions
0
votes
1 answer

xmlReadFile() (C++ Ubuntu) core dumps on broken XML

I am using the libxml2 libraries to parse XML sent to me (my program) as a file from another program. With care that should mean that I never get bad XML, but twice already I've made hand tweaks that broke the XML in the received file. By broken I…
Wes Miller
  • 2,191
  • 2
  • 38
  • 64
0
votes
0 answers

Get HTML between 2 elements using libXML2

I have to extract HTML between two elements. e.g.
Some text some other text target node…
Any
  • 168
  • 3
  • 11
0
votes
1 answer

C++, libxslt: Freeing the stylesheet document after freeing the style sheet results in crash

I'm using libxml2 with libxslt for XML processing from a C++ program. For transforming XML documents with XSL, I use the following function (error handling removed): xmlDocPtr transformXmlDocument( const xmlDocPtr inputDocument, const…
Jost
  • 5,948
  • 8
  • 42
  • 72
0
votes
1 answer

blank removal in xml using libxml2

I have the xml file as: 10 001b00100000 abcd123 The code which parses the xml…
foo_l
  • 591
  • 2
  • 10
  • 28
0
votes
1 answer

How to Create Self Terminating XML File using libxml2

I'm trying to create self terminating XML File using libxml2 , but as far as i have searched i got xmlSaveNoEmptyTags only, but i'm not sure how to use it. I'm using Objective C and libxml2 in Mac OS.
Zeus
  • 571
  • 1
  • 7
  • 23
0
votes
2 answers

Get values from XML in C++ using libxml2

I am having a hard time to get the values from a XML file. We are using libxml2 and python (output to *.txt) and then C++ to read the *.txt file. I would like to use libxml2 in C++ without going through Python. My problem is the reader (see example…
Michael
  • 1,627
  • 1
  • 19
  • 29
0
votes
1 answer

How can I fix the "Couldn't create file parser context for file ..." bug with Perl libxml on Debian?

When I try to read an XML file with XML::Simple, sometimes I get this error message: Couldn't create file parser context for file ... After some googling, it seems to be a problem with libxml-libxml-perl and is supposed to be fixed in the version…
sebthebert
  • 12,196
  • 2
  • 26
  • 37
0
votes
1 answer

xmlSecInit() prints assertion failure to stderr (g_xslt_default_security_prefs == NULL)

I have some code that is very similar to the example at http://www.aleksey.com/xmlsec/api/xmlsec-examples-sign-template-file.html: #ifndef XMLSEC_NO_XSLT xsltSecurityPrefsPtr xsltSecPrefs = NULL; #endif /* XMLSEC_NO_XSLT */ /* Init libxml…
craig65535
  • 3,439
  • 1
  • 23
  • 49
0
votes
3 answers

HTML Parser for C

I am looking for an easy to use html parser library. Currently I am trying to setup libxml2 but am running into frustrating problems. The IDE I am using is Pelles C, I took the windows files for libxml2 and put them in the appropriate folders…
Keith Miller
  • 1,337
  • 1
  • 16
  • 32
0
votes
1 answer

libxml2 error when building build_native.sh on cocos2d-x

I am creating a hybrid iOS/android game using cocos2d-x as the game engine. in the iOS side the project doesn't have any problem loading the libxml2 library. but when i build the build_native.sh in the android side, the script return an error like…
Fugogugo
  • 4,460
  • 10
  • 36
  • 50
0
votes
1 answer

Using objective c and xpath find column index when table contains column spanning cells

Im parsing a table using hpple and libxml2 in an iPhone app. I have encountered a real problem when it comes to finding the column index when sibling cells span multiple rows using colspan. I saw this question But I can't use jquery to work out the…
BON
  • 433
  • 2
  • 9
  • 18
0
votes
1 answer

Libxml2 doesn't parse a valid xml file (seg fault) on first line

I installed libxml2 and am using to compile a sample file that reads an xml document. I use the following to flags so I am using the libxml2: gcc `xml2-config --cflags xml2-config --libs` libxml.c However it crashes right on the first line of…
mihajlv
  • 2,275
  • 4
  • 36
  • 59
0
votes
0 answers

can create a shared libxml2

i am creating an application in android using ndk and jni.In my app i have requirement to parse xml data.for which i have used libxml2. when i am making a static library of libxml2 and use,it works fine. But when i am trying to make a shared library…
Subrat nayak.
  • 405
  • 1
  • 7
  • 25
0
votes
1 answer

lixml2 C xpath fails with "invalid expression"

I use libxml2 in C application to parse XML files. I get an error when I search for XPath with special character '$'. Here my code : xmlXPathExpression("//mytag/foo$"); And I get error "Invalid expression". I tried to encode speical characters like…
TheFrancisOne
  • 2,667
  • 9
  • 38
  • 58
0
votes
1 answer

Why are there blank nodes/attributes when using LibXML Ruby?

Using the Gem libxml-ruby, when we parse XML like so: document = LibXML::XML::Parser.string( xmlData ).parse for n in document.root.children # Do something end What we actually get is something like this: root -node empty -node with data -node…
Clucking Turtle
  • 922
  • 1
  • 11
  • 24