Switch branches/tags
Nothing to show
Commits on May 12, 2012
  1. Use buffers when constructing string node lists.

    Before this change xmlStringGetNodeList would perform a realloc() of the
    entire new content for every XML entity in the assigned text in order to
    merge together adjacent text nodes. This had the effect of making
    xmlSetNodeContent O(n^2), which led to unexpectedly bad performance on
    inputs that contained a large number of XML entities.
    After this change the memory management is done by the buffer API,
    avoiding the need to continually re-measure and realloc() the string.
    For my test data (6MB of 80 character lines, each ending with 
    this takes the time to xmlSetNodeContent from about 500 seconds to
    around 50ms. I have not profiled smaller cases, though I tried to
    minimize the performance impact of my change by avoiding unnecessary
    string copying.
    Signed-off-by: Conrad Irwin <>
    committed May 11, 2012
Commits on May 11, 2012
  1. HTML parser error with <noscript> in the <head>

    When the <noscript> is found, <head> is closed and a <body> element is created.
    The real <body id="xxx"> gets skipped over, so I can't see any of the
    body's attributes.
    Just don't close <head> when encountering a <noscript>
    Add a regression test too
    0lvin committed with veillard May 11, 2012
  2. XSD: optional element in complex type extension

    Libxml2 fails to validate an instance document against a schema if an element
    whose type is a complex extension of some base type with an optional child
    element and that child element is not specified in the instance document.  For
    example, suppose I have some complex type BaseType that is defined to have one
    child element in a sequence group that has minOccurs set to 0
    Remi Gacogne committed with veillard May 11, 2012
  3. Fix html serialization error and htmlSetMetaEncoding()

    The python tests were reporting errors, some of it was due to
    a small change in case encoding, but the main one was about
    htmlSetMetaEncoding(doc, NULL) being broken by not removing
    the associated meta tag anymore
    veillard committed May 11, 2012
  4. Fix an uninitialized variable use

    When compiled without SAX1 support
    veillard committed May 11, 2012
  5. Fix a compilation problem with --minimum

    Moved a #endif /* LIBXML_OUTPUT_ENABLED */ a few lines down
    to avoid reference an undefined variable
    bslack committed with veillard May 11, 2012
  6. Remove redundant and ungarded include of resolv.h

    This broke the build on Interix-6.0
    veillard committed May 11, 2012
Commits on May 10, 2012
  1. Remove git error message during configure

    If git is not installed but .git was found configure would emit an
    error message
    kalikiana committed with veillard May 10, 2012
  2. emove a bashism in

    Not portable, broke on old FreeBSD
    John Hein committed with veillard May 10, 2012
  3. xinclude with parse="text" does not use the entity loader

    The code for xinclude parse="text" was not using the registered
    entity loader, defeating attempts to control loading of files.
    shaunix committed with veillard May 10, 2012
  4. Allow to parse 1 byte HTML files

    File 1 byte long were not accepted by the HTML push parser
    0lvin committed with veillard May 10, 2012
  5. undef ERROR if already defined

    paroga committed with veillard May 10, 2012
  6. Patch that fixes the skipping of the HTML_PARSE_NOIMPLIED flag

    I just noticed that the HTML_PARSE_NOIMPLIED flag that you can pass to the
    HTML-Parser methods doesn't do anything. Its intended purpose is to stop the
    HTML-parser from forcibly adding a pair of html/body tags if the stream does
    not contain any.
    This is highly useful when you don't need this level of strictness.
    Unfortunately, specifying it doesn't work, because the option is not
    copied into the parsing context.
    HedAurabesh committed with veillard May 10, 2012
  7. Avoid memory leak if xmlParserInputBufferCreateIO fails

    In case of error on an IO creation input the given context
    is terminated with the given close function, except if the
    error happened in xmlParserInputBufferCreateIO. This can
    lead to a resource leak which is fixed by this patch.
    record committed with veillard May 10, 2012
  8. Add HTML parser support for HTML5 meta charset encoding declaration

    The charset attribute specifies the character encoding used by the document.
    This is a character encoding declaration. If the attribute is present in an XML
    document, its value must be an ASCII case-insensitive match for the string
    "UTF-8" (and the document is therefore forced to use UTF-8 as its
    However, while <meta http-equiv="Content-Type" content="text/html;
    charset=utf8"> works, <meta charset="utf8"> does not.
    While libxml2 HTML parser is not tuned for HTML5, this is a simple
    Also added a testcase
    0lvin committed with veillard May 10, 2012
  9. Fix library problems with mingw-w64

    Fix a windows only issue when compiling the library with
    MingW (64 bits) using Fedora cross-compiler chain.
    Change the dllexport for data
    mooninite committed with veillard May 10, 2012
Commits on May 9, 2012
  1. fix windows build.

    ifdef addition from bug 666491 makes no sense
    robrichards committed May 9, 2012
  2. prefer native threads on win32

    When building on Win32 configure the suport to use native Windows
    threads since there is support for it unless pthreads are found
    and asked for explicitely
    ssssam committed with veillard May 9, 2012
  3. Allow to compile with Visual Studio 2010

    This patch adds project files to compile and debug libxml2 using Visual
    Studio 2010. Only few minor changes have been made to the actual source
    This patch also requires for the iconv package to be compiled with visual
    studio 2010 which has been submitted to the iconv project (see:
    Thomas Lemm committed with veillard May 9, 2012
Commits on May 8, 2012
  1. Prevent an infinite loop when dumping a node with encoding problems

    When a node is dumped with a new encoding, we may encounter characters
    that are not supported in the new encoding. libxml2 handles this by
    replacing the character with character references, but in some encodings
    this can result in an infinite loop when the character references
    themselves contain unsupported characters.
    This fixes the infinite loop by undoing a character reference substitution
    when it cannot be inserted, and returning an encoder error.
    This bug was noticed when looking into an infinite loop bug report for
    the Ruby Nokogiri project. The original bug report, "nokogiri process
    hangs on call to inner_html" is here:
    ender672 committed with veillard May 8, 2012
  2. wrong message for double hyphen in comment XML error

    The error message when you have a double hyphen in a comment is "comment
    not terminated" and should be "double hyphen in comment".
    giraffedata committed with veillard May 8, 2012
  3. xmlParseNodeInContext problems with an empty document

    When you call xmlParseNodeInContext on a fragment node with an
    empty document, the parser associates the first new node twice --
    once with the document, and once with the fragment node.
    This fixes the issue by only associating the new node with the
    fragment node.
    ender672 committed with veillard Jan 18, 2012
  4. HTML element position is not detected propperly

    The data in node_seq in xmlParserCtxt was not updated properly
    when parsing HTML. This patch fixes the accounting for both
    pull and push mode of HTML parsing.
    p-an committed with veillard May 8, 2012
  5. Fix mingw's snprintf configure check

    For mingw, snprintf is defined as _snprintf and therefore the check
    should be for _snprintf. This applies to _vsnprintf too.
    ylatuya committed with veillard May 8, 2012
Commits on May 7, 2012
  1. Add "whereis" command to xmllint shell

    When playing with xpath in the xmllint shell, it's really handy to be
    able to ask where the returned nodes live in the tree, in the same
    way "pwd" asks where the current node lives.
    The feature is actually quite easy to implement by combining the
    functionality of the existing dir/ls and pwd commands (see proposed patch).
    Example usage:
    / > whereis //last_name
    Ryan committed with veillard May 7, 2012
  2. fixed a 64bit big endian issue

    patch fixes a 64bit endian issue, making libxml2 work (again) on ppc64
    unsigned int and size_t are differently sized on 64bit.
    msmeissn committed with veillard May 7, 2012
  3. Improve xmllint shell

    adds namespace support to ls, du and the element named in
    the command shell prompt. It also fixes du to actually dump
    the requested path, if the user gives one, rather than always
    dumping the whole file.
    Ryan committed with veillard May 7, 2012
  4. Update README.tests

    document make check, make valgrind and fix a typo pointed out by
    Daniel Neel <>
    veillard committed May 7, 2012
  5. Fix an off by one pointer access

    getting out of the range of memory allocated for xpointer decoding
    Jüri Aedla committed with veillard May 7, 2012
  6. URI handling code is not OOM resilient

    as pointed out by Dan Berrange, add a small comment in the header
    veillard committed May 7, 2012
  7. Fix an error in comment

    nsWarn handler is not about parser fatal errors
    veillard committed May 7, 2012