libxml2xmlsec

Set Program to use LIBXML_PARSEHUGE


I am using the commandline app xmlsec to encrypt and decrypt files. I got an XML File with a node at 40 MB of size. I already found out i need to set

LIBXML_PARSEHUGE

to parse nodes bigger than 10 MB

Does anyone know how to enable this? I searched the source code of xmlsec for the Parser init, but couldn't find a way to integrate the option Do i have to set this inside the source and recompile it? When so, do i have to recompile libxml or xmlsec?


Solution

  • Ok, so i found the solution and post it here just in case anyone needs this sometime In

    src/Parser.c 
    xmlDocPtr xmlSecParseFile(const char *filename){}
    

    Contains this

    /* enable parsing of XML documents with large text nodes */
    xmlCtxtUseOptions (ctxt, XML_PARSE_HUGE);
    

    Orinigally, the second line is commented out. You have to uncomment it and recompile the tool