ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
838 stars 1.53k forks source link

xmlSAX2Characters: huge text node #4897

Open Th3Heavy opened 2 years ago

Th3Heavy commented 2 years ago

Summary

When i try to format ou parse a big file (actualy just 15M) with the xml module, i get: xmlSAX2Characters: huge text node

for the linux command he exist a parameter to fix it: --huge : remove any internal arbitrary parser limits

Issue Type

Bug Report

Component Name

community.general.xml

Ansible Version

2.12.4

Community.general Version

4.8.0

Configuration

don't find any config file

OS / Environment

centos stream 9

Steps to Reproduce

 - name: xpath getItem.xml
    community.general.xml:
      path: "/tmp/test.txt"
      input_type: xml
      namespaces:
        a: http://schemas.xmlsoap.org/soap/envelope/
        b: http://serena.com/dmwebservices2
        c: http://serena.com/dimensions/basic/1
      xpath: /a:Envelope/a:Body/b:getItemsResponse/b:items/c:file/c:fileContents
      content: text
    register: fileContentsList

test.txt

Expected Results

get only the value of field fileContents on the register fileContentsList

Actual Results

xmlSAX2Characters: huge text node

Code of Conduct

ansibullbot commented 2 years ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 2 years ago

cc @cmprescott @dagwieers @sm4rk0 @tbielawa click here for bot help

ansibullbot commented 2 years ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help