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
26
votes
9 answers

Mountain Lion - LibXML & Nokogiri

I've just updated to OS X Mountain Lion and I'm getting the following when working with rails and terminal. WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8 I've had a look at other answers to a similar…
Domness
  • 7,585
  • 8
  • 40
  • 50
23
votes
2 answers

Error installing nokogiri 1.6.0 on mac (libxml2)

UPDATE: Fixed I found the answer in another thread. The workaround I used is to tell Nokogiri to use the system libraries instead: NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle install ==== Trying to install nokogiri 1.6.0 on a mac. With previous…
Jose Enrique
  • 609
  • 6
  • 10
20
votes
5 answers

Adding libxml2 in XCode

I have added libxml2 to my Xcode 4 project following this guide. But it's not working. Xcode gives me error saying it no such libxml2 directory. What am I doing wrong? Here's the screenshots of the target settings of my project: Thanks.
user635064
  • 6,219
  • 12
  • 54
  • 100
20
votes
2 answers

How to use xmllint to validate an XML document with an XSD?

I'm trying to use xmllint to check my work while developing a basic XSD i.e. XML Schema schema. However it's giving me an error Validation failed: no DTD found. What am I doing wrong? My xmllint command: xmllint --noout --valid --schema simple.xsd…
Tristan
  • 1,730
  • 3
  • 20
  • 25
20
votes
4 answers

How can I install XML::LibXML on Ubuntu

Here is the stdout for install: $sudo cpanm XML::LibXML --> Working on XML::LibXML Fetching http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0014.tar.gz ... OK Configuring XML-LibXML-2.0014 ... N/A ! Configure failed for XML-LibXML-2.0014.…
kamal
  • 9,637
  • 30
  • 101
  • 168
19
votes
4 answers

simplexml_load_file(): I/O warning : failed to load external entity "/user-bundle/Resources/config/doctrine/model/User.orm.xml

I have some issue with my production deployment of Symfony2, I've tried many solutions, but none have worked. I randomly have this error when accessing my symfony application on production environment: ( ! ) Fatal error: Uncaught exception…
PyRowMan
  • 190
  • 1
  • 10
18
votes
1 answer

iPhone libxml2 undefined symbols (with gdata, kissxml, touchxml, etc.)

I'm trying to use any one of the libxml based 3rd party XML parsers, but I can't because I think I have a libxml2 problem of some sort I set my other linker flags to -lxml2 and header search paths to /usr/include/libxml2 but I still get a ton of…
dougalg
  • 529
  • 4
  • 14
17
votes
6 answers

Compiler can't find libxml/parser.h

I am on Debian 8 (Jessie), 64 Bit. I installed libxml2-dev, which now sits in /usr/include/libxml2/libxml. But when I do (just like libxml docs say) #include I only get when compiling (with gcc) fatal error: libxml/parser.h: no…
Foo Bar
  • 1,764
  • 4
  • 24
  • 43
17
votes
4 answers

How can I tell what version of libxml2 and libxslt are installed on OS X?

I'm trying to find out what version I currently have installed. OS X Mountain Lion (10.8.2) Thanks in advance!
Spanky
  • 5,608
  • 10
  • 39
  • 45
16
votes
2 answers

Can't install Nokogiri gem, "libxml/parser.h" not found, but its there, why?

I tried to install Nokogiri but I always get an compiling error: checking for libxml/parser.h... *** extconf.rb failed *** but, I've installed it and all other dependencies. I try to give the installer hints like this: %> gem install nokogiri --…
Manuel Görlich
  • 169
  • 1
  • 4
16
votes
7 answers

libxml-ruby: Failed to build gem native extension

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…
Cjmarkham
  • 9,484
  • 5
  • 48
  • 81
16
votes
2 answers

libxml2 xmlChar* cast to char*

How would you convert / cast an xmlChar* to char* from the libxml2 library? Thanks.
mobilekid
  • 1,629
  • 5
  • 19
  • 27
15
votes
5 answers

How can libxml2 be used to parse data from XML?

I have looked around at the libxml2 code samples and I am confused on how to piece them all together. What are the steps needed when using libxml2 to just parse or extract data from an XML file? I would like to get hold of, and possibly store…
some_id
  • 29,466
  • 62
  • 182
  • 304
15
votes
4 answers

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

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: >…
Matthew Lowe
  • 1,350
  • 1
  • 17
  • 29
14
votes
3 answers

Why does this XML validation via XSD fail in libxml2 (but succeed in xmllint) and how do I fix it?

If I run this XML validation via xmllint: xmllint --noout --schema schema.xsd test.xml I get this success message: .../test.xml validates However if I run the same validation via libxml2's C API: int result = xmlSchemaValidateDoc(...) I get a…
mtree
  • 617
  • 2
  • 6
  • 18