Skip to content

bug/xml indentation causes parsing error #4358

Description

@Justin9400

Describe the bug
This error occurs when xml opening tags are on the same level as the xml context itself

'lxml.etree._ProcessingInstruction' object has no attribute 'is_phrasing'

This breaks

    ```xml
    <?xml version="1.0" encoding="UTF-8"?>

This succeeds

```xml
   <?xml version="1.0" encoding="UTF-8"?>

To Reproduce
Use unstructured to process a markdown file that contains an xml block with the opening tags on the same level as the start of the content

Expected behavior
This should not be a breaking format, it should continue in the same way as is the xml opening tag was tabbed back

Screenshots
If applicable, add screenshots to help explain your problem.

Environment Info
Please run python scripts/collect_env.py and paste the output here.
I am running unstructured version 0.18.24

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions