Search Results

Search found 165 results on 7 pages for 'libxml2'.

Page 1/7 | 1 2 3 4 5 6 7  | Next Page >

  • Why doesn't libxml2 support XPath 2.0?

    - by Peter Krauss
    Libxml2 is the faster, stable and most popular "open DOM engine"... And the "XML C parser and toolkit of Gnome". The initial release of Libxml2 was September 1999, 13 years ago. XPath v1.0 was also released at 1999. XPath v2.0 became a recommendation on January 2007, 6 years ago. We can suppose that the Libxml2 community have time and people to develop a XPath2... So, what is the problem? Why doesn't libxml2 (or a "libxml2 fork" or an "experimental lib"!) support XPath 2.0? Some raised hypotheses to discussion at answers, Because Libxml2 community (and Gnome community) dislikes and have no motivation to develop something to XPath2 or xQuery. 1.1. XPath2 needs (by mathematical proof) a very heavy parser, much slower, etc. that is not suitable to real-world Libxml2 applications. 1.2. Other "ideologic" dislikes/motivations. Because it is written with C, and for XPath2 is better to develop with C++. Because the above hypothesis of "Libxml2 community have time and people" is false. Because XPath2 became stable in 2010 with its "Second Edition" release, and ~2.5 years is not (?) enough time.

    Read the article

  • Libxml2: undefined reference to xmlTextReaderConstName

    - by Dmitry
    I have installed the latest libxml2-2.8.0, as usual: $ ./configure, $ make, $ make install. The $ xml2-config --cflags --libs gives this output: -I/usr/local/include/libxml2 -L/usr/local/lib -lxml2 -lm But trying to compile any example... $ gcc `xml2-config --cflags --libs` xmltest.c The linker says: /tmp/cc8ezrPl.o: In function `processNode': xmltest.c:(.text+0x19): undefined reference to `xmlTextReaderConstName' xmltest.c:(.text+0x38): undefined reference to `xmlTextReaderConstValue' ...etc. Anything I've googled can be solved by xml2-config --cflags --libs flags, or upgrading to the latest version of libxml2, or something. Unfortunately, neither works for me. What can be the steps to identify the problem? Using Ubuntu 12.04 64-bit.

    Read the article

  • Install PHP 5 without libxml2

    - by Mike Trpcic
    I am trying to install a copy of PHP 5 to my home directory on the school computer. The problem is that whenever I try, it complains that my copy of libxml2 is too outdated to work. Is there any way I can install this without upgrading libxml2, since I don't have permission to upgrade. Any suggestions?

    Read the article

  • Can I use relative XPath expressions in libxml2?

    - by brbr
    I am wondering whether it is possible to use relative XPath expressions in libxml2. This is from the javax.xml.xpath API and I would like to do the similar thing using libxml2: Node widgetNode = (Node) xpath.evaluate(expression, document, XPathConstants.NODE); With a reference to the element, a relative XPath expression can now written to select the child element: XPath xpath = XPathFactory.newInstance().newXPath(); String expression = "manufacturer"; Node manufacturerNode = (Node) xpath.evaluate(expression, **widgetNode**, XPathConstants.NODE);

    Read the article

  • Memory leaks in libxml2.2

    - by KSH
    I am using libxml2 to parse xml content in my iPhone app. The xml content is downloaded from a server similar to the Apple's own TopSongs sample app. When I check for leaks using the Instruments tool, I see memory leaks being reported on xmlNewParserCtxt, xmlNewInputStream and xmlAllocParserInputBuffer. I have called xmlFreeParserCtxt(context) at applicable places (dealloc). Am I missing something else ? Is this a known issue to contend with when using libxml2 parsers ?

    Read the article

  • docs/examples on libxml2 type system?

    - by Wang
    I'm reading through the libxml2 API and examples on xmlsoft.com and having some real difficulty wrapping my head around the type system. For example, the _xmlAttribute struct has an xmlChar* field called name. This obviously refers to the name of the attribute (e.g., "bar" for the struct tied to the element <foo bar='baz' />). The _xmlAttribute struct also has a field called value, which I would expect to be "baz", except the type is xmlNodePtr. Um, what? I guess I could write up some test code and examine the memory in gdb, but there has to be an easier way. Has anyone written up examples of the data structures generated by a libxml2 parser? I'm looking for an English prose text, not generated documentation, that will walk me through the various types and the values they take when parsing some example bit of XML. Bonus points if it presents only the subset of libxml2 needed to read and write a config file---no namespaces or XPath or even modifying an existing document, just parse some XML, access the data, and then write it out again.

    Read the article

  • Disable debug output in libxml2 and xmlsec

    - by ereOn
    Hi, In my software, I use libxml2 and xmlsec to manipulate (obviously) XML data structures. I mainly use XSD schema validation and so far, it works well. When the data structure input by the client doesn't match the XSD schema, libxml2 (or xmlsec) output some debug strings to the console. Here is an example: Entity: line 1: parser error : Start tag expected, '<' not found DUMMY<?xml ^ While those strings are useful for debugging purposes, I don't want them to appear and polute the console output in the released software. So far, I couldn't find an official way of doing this. Do you know how to suppress the debug output or (even better) to redirect it to a custom function ? Many thanks.

    Read the article

  • Looking for streaming xml pretty printer in C/C++ using expat or libxml2

    - by Mark Zeren
    I'm looking for a streaming xml pretty printer for C/C++ that's either self contained or that uses libxml2 or expat. I've searched a bit and not found one. It seems like something that would be generally useful. Am I missing an obvious tool that does this? Background: I have a library that outputs xml without whitespace all on one line. In some cases I'd like to pretty print that output. I'm looking for a BSD-ish licensed C/C++ library or sample code that will take a raw xml byte stream and pretty print it. Here's some pseudo code showing one way that I might use this functionality: void my_write(const char* buf, int len); PrettyPrinter pp(bind(&my_write)); while (...) { // ... get some more xml ... const char* buf = xmlSource.get_buf(); int len = xmlSource.get_buf_len(); int written = pp.write(buf, len); // calls my_write with pretty printed xml // ... error handling, maybe call write again, etc. ... } I'd like to avoid instantiating a DOM representation. I already have dependencies on the expat and libxml2 shared libraries, and I'd rather not add any more shared library dependencies.

    Read the article

  • Simple libxml2 HTML parsing example, using Objective-c, Xcode, and HTMLparser.h

    - by Stu
    Please can somebody show me a simple example of parsing some HTML using libxml. #import <libxml2/libxml/HTMLparser.h> NSString *html = @"<ul><li><input type=\"image\" name=\"input1\" value=\"string1value\" /></li><li><input type=\"image\" name=\"input2\" value=\"string2value\" /></li></ul><span class=\"spantext\"><b>Hello World 1</b></span><span class=\"spantext\"><b>Hello World 2</b></span>"; 1) Say I want to parse the value of the input whose name = input2. Should output "string2value". 2) Say I want to parse the inner contents of each span tag whose class = spantext. Should output: "Hello World 1" and "Hello World 2".

    Read the article

  • I can't use dashes in XPATH on iphone using libxml2

    - by user249488
    I'm trying to parse HTML data using KissXML for iphone. I've noticed that I can't have dashes in the id() tag, otherwise it won't evaluate. For example, if I'm trying to get the element at I would do id("foo") However, if I try to get at element , and I try id("foo-bar") the libxml2 XPATH engine doesn't seem to return anything. It works using the XPATH check for firefox, though. Anyone run into this issue and know of a reason why it's happening or have a workaround (besides using the absolute XPATH path?)

    Read the article

  • libxml2 on iPhone

    - by mellkord
    I'm trying to parse HTML file with libxml2. Usually this works fine, but not in this case: <p> <b>Titles</b> (Some Text) <table> <tr> <td valign="top"> …Something1... </td> <td align="right" valign="top"> …Something2... </td> </tr> </table> </p> I do this query to get the first <td> //p[b='Titles']/table/tr/td[0] but nothing is returned because libxml think that <table> tag is not a child of a tag <p> and following him. And finally the question WHY?

    Read the article

  • why libxml2 quotes starting double slash in CDATA with javascript

    - by Vincenzo
    This is my code: <?php $data = <<<EOL <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <script type="text/javascript"> //<![CDATA[ var a = 123; // JS code //]]> </script> </html> EOL; $dom = new DOMDocument(); $dom->preserveWhiteSpace = false; $dom->formatOutput = false; $dom->loadXml($data); echo '<pre>' . htmlspecialchars($dom->saveXML()) . '</pre>'; This is result: <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <script type="text/javascript"><![CDATA[ //]]><![CDATA[ var a = 123; // JS code //]]><![CDATA[ ]]></script></html> If and when I remove the DOCTYPE notation from XML document, CDATA works properly and leading/trailing double slash is not turned into CDATA. What is the problem here? Bug in libxml2? PHP version is 5.2.13 on Linux. Thanks.

    Read the article

  • Weird XPath behavior in libxml2

    - by Josh K
    I have this XML tree that looks like this (I've changed the tag names but if you're really clever you may figure out what I'm actually doing.) <ListOfThings> <Thing foo:action="add"> <Bar>doStuff --slowly</Bar> <Index>1</Index> </Thing> <Thing foo:action="add"> <Bar>ping yourMother.net</Bar> <Index>2</Index> </Thing> </ListOfThings> With libxml2, I want to programmatically insert a new Thing tag into the ListOfThings with the Index being the highest current index, plus one. I do it like this (sanity checking removed for brevity): xpath = "//urn:myformat[@foo='bar']/" "urn:mysection[@name='baz']/" "urn:ListOfThings/urn:Thing/urn:Index"; xpathObj = xmlXPathEvalExpression(xpath, xpathCtx); nodes = xpathObj->nodesetval; /* Find last value and snarf the value of the tag */ highest = atoi(nodes->nodeTab[nodes->nodeNr - 1]->children->content); snprintf(order, sizeof(order), "%d", highest + 1); /* highest index plus one */ /* now move up two levels.. */ cmdRoot = nodes->nodeTab[nodes->nodeNr - 1]; ASSERT(cmdRoot->parent && cmdRoot->parent->parent); cmdRoot = cmdRoot->parent->parent; /* build the child tag */ newTag = xmlNewNode(NULL, "Thing"); xmlSetProp(newTag, "foo:action", "add"); /* set new node values */ xmlNewTextChild(newTag, NULL, "Bar", command); xmlNewChild(newTag, NULL, "Index", order); /* append this to cmdRoot */ xmlAddChild(cmdRoot, newTag); But if I call this function twice (to add two Things), the XPath expression doesn't catch the new entry I made. Is there a function I need to call to kick XPath in the shins and get it to make sure it really looks over the whole xmlDocPtr again? It clearly does get added to the document, because when I save it, I get the new tags I added. To be clear, the output looks like this: <ListOfThings> <Thing foo:action="add"> <Bar>doStuff --slowly</Bar> <Index>1</Index> </Thing> <Thing foo:action="add"> <Bar>ping yourMother.net</Bar> <Index>2</Index> </Thing> <Thing foo:action="add"> <Bar>newCommand1</Bar> <Index>3</Index> </Thing> <Thing foo:action="add"> <Bar>newCommand2</Bar> <Index>3</Index> <!-- this is WRONG! --> </Thing> </ListOfThings> I used a debugger to check what happened after xmlXPathEvalExpression got called and I saw that nodes->nodeNr was the same each time. Help me, lazyweb, you're my only hope!

    Read the article

  • Missing AnyConnect libxml2.so.2

    - by Hypercube
    I'm trying to install Cisco AnyConnect VPN Client on Maverick 64-bit. I'm getting the following errors: Installing Cisco AnyConnect VPN Client ... Removing previous installation... /opt/cisco/vpn/bin/manifesttool: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory vpnagentd: no process found Extracting installation files to /tmp/vpn.Mjh9Z5/vpninst086037244.tgz... Unarchiving installation files to /tmp/vpn.Mjh9Z5... Starting the VPN agent... /opt/cisco/vpn/bin/vpnagentd: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory I have libxml2.so.2 in /usr/lib, though. Should it be somewhere else? Thanks in advance.

    Read the article

  • zlib/libxml2 duplicate package?

    - by Fusion
    I've been updating my amazon ec2 micro instance every month till now. when i try to "yum update" i receive this error : zlib-1.2.5-7.11.amzn1.x86_64 has installed conflicts libxml2 < ('0', '2.7.7', None): libxml2-2.7.6-4.12.amzn1.x86_64 zlib-1.2.5-7.11.amzn1.x86_64 is a duplicate with zlib-1.2.3-27.9.amzn1.x86_64 yum update output: http://pastebin.com/Dfq0yphN I've tried to update separately zlib and libxml2 zlib: same "duplicate" error. libxml2: Transaction Check Error: package libxml2-2.7.8-10.24.amzn1.x86_64 is already installed what can i do?

    Read the article

  • Rails Gem Install Problems: Google-Geocode

    - by spin-docta
    I'm try to install google-geocode for rails sudo gem install google-geocode but I get the following error. Any suggestions? Building native extensions. This could take a while... ERROR: Error installing google-geocode: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb checking for iconv.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include,/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include/libxml2,/usr/include,/usr/include/libxml2... yes checking for libxml/parser.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include,/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include/libxml2,/usr/include,/usr/include/libxml2... yes checking for libxslt/xslt.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include,/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include/libxml2,/usr/include,/usr/include/libxml2... yes checking for libexslt/exslt.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include,/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include/libxml2,/usr/include,/usr/include/libxml2... yes checking for xmlParseDoc() in -lxml2... no libxml2 is missing. try 'port install libxml2' or 'yum install libxml2' *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv-include=${iconv-dir}/include --with-iconv-lib --without-iconv-lib=${iconv-dir}/lib --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --without-xml2-lib=${xml2-dir}/lib --with-xslt-dir --without-xslt-dir --with-xslt-include --without-xslt-include=${xslt-dir}/include --with-xslt-lib --without-xslt-lib=${xslt-dir}/lib --with-xml2lib --without-xml2lib Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.0 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.0/ext/nokogiri/gem_make.out

    Read the article

  • CVE-2008-3529 Buffer overflow vulnerability in libxml2

    - by chandan
    CVE DescriptionCVSSv2 Base ScoreComponentProduct and Resolution CVE-2008-3529 Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability 10.0 libxml2 Solaris 10 SPARC: 125731-07 X86: 125732-07 Solaris 9 Contact Support This notification describes vulnerabilities fixed in third-party components that are included in Sun's product distribution.Information about vulnerabilities affecting Oracle Sun products can be found on Oracle Critical Patch Updates and Security Alerts page.

    Read the article

  • CVE-2012-5134 Buffer Overflow vulnerability in libxml2

    - by RitwikGhoshal
    CVE DescriptionCVSSv2 Base ScoreComponentProduct and Resolution CVE-2012-5134 Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability 6.8 libxml2 Solaris 10 SPARC: 125731-10 X86: 125732-10 Solaris 11.1 11.1.7.5.0 This notification describes vulnerabilities fixed in third-party components that are included in Oracle's product distributions.Information about vulnerabilities affecting Oracle products can be found on Oracle Critical Patch Updates and Security Alerts page.

    Read the article

  • CVE-2014-0191 Denial of Service(DOS) vulnerability in Libxml2

    - by Ritwik Ghoshal
    CVE DescriptionCVSSv2 Base ScoreComponentProduct and Resolution CVE-2014-0191 Denial of Service(DOS) vulnerability null Libxml2 Solaris 11.2 11.2.1.5.0 This notification describes vulnerabilities fixed in third-party components that are included in Oracle's product distributions.Information about vulnerabilities affecting Oracle products can be found on Oracle Critical Patch Updates and Security Alerts page.

    Read the article

  • CVE-2012-0841 Denial of Service (DoS) vulnerability in libxml2

    - by chandan
    CVE DescriptionCVSSv2 Base ScoreComponentProduct and Resolution CVE-2012-0841 Denial of Service (DoS) vulnerability 5.0 libxml2 Solaris 11 11/11 SRU 10.5 Solaris 10 SPARC: 125731-08 X86: 125732-08 Solaris 9 SPARC: 114014-29 X86: 114015-29 This notification describes vulnerabilities fixed in third-party components that are included in Oracle's product distributions.Information about vulnerabilities affecting Oracle products can be found on Oracle Critical Patch Updates and Security Alerts page.

    Read the article

  • CVE-2011-3102 Numeric Errors vulnerability in libxml2

    - by chandan
    CVE DescriptionCVSSv2 Base ScoreComponentProduct and Resolution CVE-2011-3102 Numeric Errors vulnerability 10.0 libxml2 Solaris 11 11/11 SRU 10.5 Solaris 10 SPARC : 125731-08 , x86 : 125732-08 Solaris 9 Contact Support This notification describes vulnerabilities fixed in third-party components that are included in Oracle's product distributions.Information about vulnerabilities affecting Oracle products can be found on Oracle Critical Patch Updates and Security Alerts page.

    Read the article

  • CVE-2010-4008 Denial of Service (DoS) vulnerability in libxml2

    - by chandan
    CVE DescriptionCVSSv2 Base ScoreComponentProduct and Resolution CVE-2010-4008 Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability 4.3 libxml2 Solaris 10 SPARC: 125731-07 X86: 125732-07 Solaris 11 Contact Support This notification describes vulnerabilities fixed in third-party components that are included in Sun's product distribution.Information about vulnerabilities affecting Oracle Sun products can be found on Oracle Critical Patch Updates and Security Alerts page.

    Read the article

1 2 3 4 5 6 7  | Next Page >