{
  "id": "task_libraries:xml/python",
  "path": "/exapedia/python-xml-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python XML libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python XML libraries parse XML documents into trees or dictionaries and write XML back out. An incremental parser processes a large document in steps rather than waiting for the whole input. These libraries let apps read feeds, configuration files, and API responses from services that return XML."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python XML libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#lxml",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F110"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F111"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F117"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F114"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F112"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#beautiful-soup",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F126"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#defusedxml",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F141"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xmltodict",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F157"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F159"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xmlschema",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F173"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xsdata",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F191"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pydantic-xml",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F209"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#untangle",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F227"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#lxml",
          "label": [
            {
              "t": "text",
              "text": "lxml"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F111"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Native XSD validation",
            "Nested dictionary output",
            "Namespace URI matching"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#lxml",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F110"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F118"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F119"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F120"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#beautiful-soup",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F126"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#defusedxml",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F141"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xmltodict",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F157"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xmlschema",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F173"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xsdata",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F191"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pydantic-xml",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F209"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#untangle",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F227"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "lxml",
          "name": [
            {
              "t": "fact",
              "fact": "F110"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/lxml/lxml"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/lxml"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/lxml/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F13"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F111"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F117"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F113"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F112"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/lxml/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F110"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F124"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F125"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/scrapy/parsel",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F124"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def create_root_node(\n    text: str,\n    parser_cls: type[_ParserType],\n    base_url: str | None = None,\n    huge_tree: bool = True,\n    body: bytes = b\"\",\n    encoding: str = \"utf-8\",\n) -> etree._Element:\n    \"\"\"Create root node for text using given parser class.\"\"\"\n    if text:\n        body = text.strip().replace(\"\\x00\", \"\").encode(encoding) or b\"<html/>\"\n    elif codecs.lookup(encoding).name != \"utf-8\":\n        # lxml handles bytes that the declared encoding cannot decode by\n        # truncating the document there, and characters that span several\n        # bytes, as in UTF-16, are broken by the null and whitespace stripping\n        # below. Only UTF-8 bytes are passed as is, since lxml does report\n        # invalid UTF-8, and it covers most input.\n        return _root_from_decoded_body(body, parser_cls, base_url, huge_tree, encoding)\n    else:\n        body = body.replace(b\"\\x00\", b\"\").strip() or b\"<html/>\"\n\n    parser = parser_cls(recover=True, encoding=encoding, huge_tree=huge_tree)\n    root = None\n    try:\n        root = etree.fromstring(body, parser=parser, base_url=base_url)\n    except etree.XMLSyntaxError:\n        if text or not _has_encoding_error(parser):\n            raise\n    if not text and _has_encoding_error(parser):\n        # Invalid bytes reach the tree as is, and reading them raises\n        # UnicodeDecodeError from lxml.\n        return _root_from_decoded_body(body, parser_cls, base_url, huge_tree, encoding)\n    if not huge_tree:\n        for error in parser.error_log:\n            if \"use XML_PARSE_HUGE option\" in error.message:\n                warnings.warn(\n                    \"Input data is too big. Set huge_tree=True for huge_tree support.\",\n                    stacklevel=2,\n                )\n    if root is None:\n        root = etree.fromstring(b\"<html/>\", parser=parser, base_url=base_url)\n    return root",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/scrapy/parsel/blob/8a3f0412868d65626364db66a84f32fda15776b2/parsel/selector.py#L122-L163",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F123"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20lxml&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F110"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from lxml import etree\nroot = etree.fromstring(b'<message>Hello</message>')\nprint(root.text)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://lxml.de/tutorial.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "tutorial.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F115"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "beautiful-soup",
          "name": [
            {
              "t": "fact",
              "fact": "F126"
            }
          ],
          "links": [
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/beautifulsoup4"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/beautifulsoup4/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F36"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/beautifulsoup4/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F126"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F37"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchain-community",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F139"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def parse_sitemap(self, soup: Any, *, depth: int = 0) -> List[dict]:\n    \"\"\"Parse sitemap xml and load into a list of dicts.\n\n    Args:\n        soup: BeautifulSoup object.\n        depth: current depth of the sitemap. Default: 0\n\n    Returns:\n        List of dicts.\n    \"\"\"\n    if depth >= self.max_depth:\n        return []\n\n    els: List[Dict] = []\n\n    for url in soup.find_all(\"url\"):\n        loc = url.find(\"loc\")\n        if not loc:\n            continue\n\n        # Strip leading and trailing whitespace and newlines\n        loc_text = loc.text.strip()\n\n        if self.restrict_to_same_domain and not self.is_local:\n            if _extract_scheme_and_domain(loc_text) != _extract_scheme_and_domain(\n                self.web_path\n            ):\n                continue\n\n        if self.allow_url_patterns and not any(\n            re.match(regexp_pattern, loc_text)\n            for regexp_pattern in self.allow_url_patterns\n        ):\n            continue\n\n        els.append(\n            {\n                tag: prop.text.strip()\n                for tag in [\"loc\", \"lastmod\", \"changefreq\", \"priority\"]\n                if (prop := url.find(tag))\n            }\n        )\n\n    for sitemap in soup.find_all(\"sitemap\"):\n        loc = sitemap.find(\"loc\")\n        if not loc:\n            continue\n\n        soup_child = self.scrape_all([loc.text], \"xml\")[0]\n        els.extend(self.parse_sitemap(soup_child, depth=depth + 1))\n    return els",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchain-community/blob/f425a3ed1933173fb3694b81359d1519c4f82d36/libs/community/langchain_community/document_loaders/sitemap.py#L151-L201",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F138"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20beautifulsoup4&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F126"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from bs4 import BeautifulSoup\nsoup = BeautifulSoup('<message>Hello</message>', 'xml')\nprint(soup.message.get_text())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://www.crummy.com/software/BeautifulSoup/bs4/doc/",
                  "label": [
                    {
                      "t": "text",
                      "text": "doc.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F131"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "defusedxml",
          "name": [
            {
              "t": "fact",
              "fact": "F141"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/tiran/defusedxml"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/defusedxml"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/defusedxml/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F60"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/defusedxml/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F141"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F61"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F62"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/microsoft/markitdown",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F155"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def convert(\n    self,\n    file_stream: BinaryIO,\n    stream_info: StreamInfo,\n    **kwargs: Any,  # Options to pass to the converter\n) -> DocumentConverterResult:\n    with zipfile.ZipFile(file_stream, \"r\") as z:\n        # Extracts metadata (title, authors, language, publisher, date, description, cover) from an EPUB file.\n\n        # Locate content.opf\n        container_dom = minidom.parse(z.open(\"META-INF/container.xml\"))\n        opf_path = container_dom.getElementsByTagName(\"rootfile\")[0].getAttribute(\n            \"full-path\"\n        )\n\n        # Parse content.opf\n        opf_dom = minidom.parse(z.open(opf_path))\n        metadata: Dict[str, Any] = {\n            \"title\": self._get_text_from_node(opf_dom, \"dc:title\"),\n            \"authors\": self._get_all_texts_from_nodes(opf_dom, \"dc:creator\"),\n            \"language\": self._get_text_from_node(opf_dom, \"dc:language\"),\n            \"publisher\": self._get_text_from_node(opf_dom, \"dc:publisher\"),\n            \"date\": self._get_text_from_node(opf_dom, \"dc:date\"),\n            \"description\": self._get_text_from_node(opf_dom, \"dc:description\"),\n            \"identifier\": self._get_text_from_node(opf_dom, \"dc:identifier\"),\n        }\n\n        # Extract manifest items (ID → href mapping)\n        manifest = {\n            item.getAttribute(\"id\"): item.getAttribute(\"href\")\n            for item in opf_dom.getElementsByTagName(\"item\")\n        }\n\n        # Extract spine order (ID refs)\n        spine_items = opf_dom.getElementsByTagName(\"itemref\")\n        spine_order = [item.getAttribute(\"idref\") for item in spine_items]\n\n        # Convert spine order to actual file paths\n        base_path = \"/\".join(\n            opf_path.split(\"/\")[:-1]\n        )  # Get base directory of content.opf\n        zip_names = set(z.namelist())\n        spine = [\n            self._resolve_manifest_href(manifest[item_id], base_path, zip_names)\n            for item_id in spine_order\n            if item_id in manifest\n        ]\n\n        # Extract and convert the content\n        markdown_content: List[str] = []\n        for file in spine:\n            if file in z.namelist():\n                with z.open(file) as f:\n                    filename = os.path.basename(file)\n                    extension = os.path.splitext(filename)[1].lower()\n                    mimetype = MIME_TYPE_MAPPING.get(extension)\n                    converted_content = self._html_converter.convert(\n                        f,\n                        StreamInfo(\n                            mimetype=mimetype,\n                            extension=extension,\n                            filename=filename,\n                        ),\n                        **kwargs,\n                    )\n                    markdown_content.append(converted_content.markdown.strip())\n\n        # Format and add the metadata\n        metadata_markdown = []\n        for key, value in metadata.items():\n            if isinstance(value, list):\n                value = \", \".join(value)\n            if value:\n                metadata_markdown.append(f\"**{key.capitalize()}:** {value}\")\n\n        markdown_content.insert(0, \"\\n\".join(metadata_markdown))\n\n        return DocumentConverterResult(\n            markdown=\"\\n\\n\".join(markdown_content), title=metadata[\"title\"]\n        )",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/microsoft/markitdown/blob/ed178952a6672abdfd35b5f9e76a80b6cefc086e/packages/markitdown/src/markitdown/converters/_epub_converter.py#L55-L134",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F154"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20defusedxml&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F141"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from defusedxml.ElementTree import fromstring\nroot = fromstring('<message>Hello</message>')\nprint(root.text)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/defusedxml/0.7.1/json#info.description",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F146"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "xmltodict",
          "name": [
            {
              "t": "fact",
              "fact": "F157"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/martinblech/xmltodict"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/xmltodict"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/xmltodict/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F87"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F159"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/xmltodict/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F157"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F88"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F89"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/getmoto/moto",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F171"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _bucket_tagging_from_body(self) -> dict[str, str]:\n    parsed_xml = xmltodict.parse(self.body)\n\n    tags = {}\n    # Optional if no tags are being sent:\n    if parsed_xml[\"Tagging\"].get(\"TagSet\"):\n        # If there is only 1 tag, then it's not a list:\n        if not isinstance(parsed_xml[\"Tagging\"][\"TagSet\"][\"Tag\"], list):\n            tags[parsed_xml[\"Tagging\"][\"TagSet\"][\"Tag\"][\"Key\"]] = parsed_xml[\n                \"Tagging\"\n            ][\"TagSet\"][\"Tag\"][\"Value\"]\n        else:\n            for tag in parsed_xml[\"Tagging\"][\"TagSet\"][\"Tag\"]:\n                if tag[\"Key\"] in tags:\n                    raise DuplicateTagKeys()\n                tags[tag[\"Key\"]] = tag[\"Value\"]\n\n    # Verify that \"aws:\" is not in the tags. If so, then this is a problem:\n    for key, _ in tags.items():\n        if key.startswith(\"aws:\"):\n            raise NoSystemTags()\n\n    return tags",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/getmoto/moto/blob/ecc384b3e75ab471572d0d8d61c53cfd951c0fbc/moto/s3/responses.py#L2915-L2937",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F170"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20xmltodict&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F157"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import xmltodict\ndata = xmltodict.parse('<message>Hello</message>')\nprint(data['message'])\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/martinblech/xmltodict/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F162"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "xmlschema",
          "name": [
            {
              "t": "fact",
              "fact": "F173"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/sissaschool/xmlschema"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/xmlschema"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/xmlschema/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F180"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/xmlschema/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F173"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/projectacrn/acrn-hypervisor",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F189"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def validate_scenario_schema(scenario_info):\n    \"\"\"\n    Validate settings in scenario xml if there is scenario schema\n    :param xsd_doc: scenario schema\n    :param scenario_info: scenario file\n    \"\"\"\n\n    \"\"\"\n    XMLSchema does not process XInclude.\n    Use lxml to expand the schema which is feed to XMLSchema as a string.\n    \"\"\"\n    xsd_doc = parse(acrn_config_utilities.SCENARIO_SCHEMA_FILE)\n    xsd_doc.xinclude()\n    my_schema = xmlschema.XMLSchema11(tostring(xsd_doc, encoding=\"unicode\"))\n\n    it = my_schema.iter_errors(scenario_info)\n    for idx, validation_error in enumerate(it, start=1):\n        key = \"\"\n        if not validation_error:\n            continue\n        else:\n            path = str(validation_error.path).split(\"/\")\n            cnt = 0\n            for p in path:\n                if '[' in p:\n                    idx = int(p.split(\"[\")[1].split(\"]\")[0]) - 1\n                    p = p.split(\"[\")[0] + \":id=\" + str(idx)\n                    path[cnt] = p\n                cnt = cnt + 1\n            key =','.join(path[2:])\n            element = \"'\" + path[-1] + \"' \"\n            reason = validation_error.reason + \": last call: \" + str(validation_error.obj)\n            scenario_cfg_lib.ERR_LIST[key] = element + reason\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/projectacrn/acrn-hypervisor/blob/37b1c13f95696ddf543d6d77e4aed5641692672e/misc/config_tools/scenario_config/scenario_cfg_gen.py#L92-L124",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F188"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=xmlschema%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F173"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import xmlschema\nschema = xmlschema.XMLSchema('<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"><xs:element name=\"message\" type=\"xs:string\"/></xs:schema>')\nschema.validate('<message>Hello</message>')\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://xmlschema.readthedocs.io/en/stable/usage.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "usage.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F178"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "xsdata",
          "name": [
            {
              "t": "fact",
              "fact": "F191"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/tefra/xsdata"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/xsdata"
            },
            {
              "label": "Docs",
              "href": "https://xsdata.readthedocs.io/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F198"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://xsdata.readthedocs.io/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F191"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/MatthiasValvekens/pyHanko",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F207"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def generate_report(\n    embedded_sig: EmbeddedPdfSignature, status: AdESBasicValidationResult\n) -> str:\n    \"\"\"\n    Generate signature validation report in XML format according to\n    ETSI TS 119 102-2.\n\n    :param embedded_sig:\n        PDF signature to report on.\n    :param status:\n        AdES validation result to turn into a report.\n    :return:\n        A string representation of the validation report.\n    \"\"\"\n    report = ts_11910202.ValidationReport(\n        signature_validation_report=(_generate_report(embedded_sig, status),),\n        signature_validation_objects=ts_11910202.ValidationObjectListType(\n            tuple(\n                _package_validation_object(vo)\n                for vo in status.validation_objects\n            )\n        ),\n    )\n    from xsdata.formats.dataclass.serializers import XmlSerializer\n    from xsdata.formats.dataclass.serializers.config import SerializerConfig\n\n    config = SerializerConfig(indent=\"  \")\n    ser = XmlSerializer(config=config).render(report, ns_map=NAMESPACES)\n    return ser\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/MatthiasValvekens/pyHanko/blob/f5666fe8a7195413463724de60bb0a2553cfeaf7/pkgs/pyhanko/src/pyhanko/sign/validation/report/tools.py#L390-L418",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F206"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=xsdata%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F191"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from dataclasses import dataclass, field\nfrom xsdata.formats.dataclass.parsers import XmlParser\n\n@dataclass\nclass Message:\n    class Meta:\n        name = \"message\"\n    text: str = field(default=\"\", metadata={\"type\": \"Text\"})\n\nmessage = XmlParser().from_string(\"<message>Hello</message>\", Message)\nprint(message.text)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://xsdata.readthedocs.io/en/latest/data_binding/basics/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F196"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pydantic-xml",
          "name": [
            {
              "t": "fact",
              "fact": "F209"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/dapper91/pydantic-xml"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/pydantic-xml"
            },
            {
              "label": "Docs",
              "href": "https://pydantic-xml.readthedocs.io"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F216"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pydantic-xml.readthedocs.io",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F209"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/protectai/vulnhuntr",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F225"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def run():\n    parser = argparse.ArgumentParser(description='Analyze a GitHub project for vulnerabilities. Export your ANTHROPIC_API_KEY/OPENAI_API_KEY before running.')\n    parser.add_argument('-r', '--root', type=str, required=True, help='Path to the root directory of the project')\n    parser.add_argument('-a', '--analyze', type=str, help='Specific path or file within the project to analyze')\n    parser.add_argument('-l', '--llm', type=str, choices=['claude', 'gpt', 'ollama'], default='claude', help='LLM client to use (default: claude)')\n    parser.add_argument('-v', '--verbosity', action='count', default=0, help='Increase output verbosity (-v for INFO, -vv for DEBUG)')\n    args = parser.parse_args()\n\n    repo = RepoOps(args.root)\n    code_extractor = SymbolExtractor(args.root)\n    # Get repo files that don't include stuff like tests and documentation\n    files = repo.get_relevant_py_files()\n\n    # User specified --analyze flag\n    if args.analyze:\n        # Determine the path to analyze\n        analyze_path = Path(args.analyze)\n\n        # If the path is absolute, use it as is, otherwise join it with the root path so user can specify relative paths\n        if analyze_path.is_absolute():\n            files_to_analyze = repo.get_files_to_analyze(analyze_path)\n        else:\n            files_to_analyze = repo.get_files_to_analyze(Path(args.root) / analyze_path)\n\n    # Analyze the entire project for network-related files\n    else:\n        files_to_analyze = repo.get_network_related_files(files)\n    \n    llm = initialize_llm(args.llm)\n\n    readme_content = repo.get_readme_content()\n    if readme_content:\n        log.info(\"Summarizing project README\")\n        summary = llm.chat(\n            (ReadmeContent(content=readme_content).to_xml() + b'\\n' +\n            Instructions(instructions=README_SUMMARY_PROMPT_TEMPLATE).to_xml()\n            ).decode()\n        )\n        summary = extract_between_tags(\"summary\", summary)[0]\n        log.info(\"README summary complete\", summary=summary)\n    else:\n        log.warning(\"No README summary found\")\n        summary = ''\n    \n    # Initialize the system prompt with the README summary\n    system_prompt = (Instructions(instructions=SYS_PROMPT_TEMPLATE).to_xml() + b'\\n' +\n                ReadmeSummary(readme_summary=summary).to_xml()\n                ).decode()\n    \n    llm = initialize_llm(args.llm, system_prompt)\n\n    # files_to_analyze is either a list of all network-related files or a list containing a single file/dir to analyze\n    for py_f in files_to_analyze:\n        log.info(f\"Performing initial analysis\", file=str(py_f))\n\n        # This is the Initial analysis\n        with py_f.open(encoding='utf-8') as f:\n            content = f.read()\n            if not len(content):\n                continue\n\n            print(f\"\\nAnalyzing {py_f}\")\n            print('-' * 40 +'\\n')\n\n            user_prompt =(\n                    FileCode(file_path=str(py_f), file_source=content).to_xml() + b'\\n' +\n                    Instructions(instructions=INITIAL_ANALYSIS_PROMPT_TEMPLATE).to_xml() + b'\\n' +\n                    AnalysisApproach(analysis_approach=ANALYSIS_APPROACH_TEMPLATE).to_xml() + b'\\n' +\n                    PreviousAnalysis(previous_analysis='').to_xml() + b'\\n' +\n                    Guidelines(guidelines=GUIDELINES_TEMPLATE).to_xml() + b'\\n' +\n                    ResponseFormat(response_format=json.dumps(Response.model_json_schema(), indent=4\n                    )\n                ).to_xml()\n            ).decode()\n\n            initial_analysis_report: Response = llm.chat(user_prompt, response_model=Response)\n            log.info(\"Initial analysis complete\", report=initial_analysis_report.model_dump())\n\n            print_readable(initial_analysis_report)\n\n            # Secondary analysis\n            if initial_analysis_report.confidence_score > 0 and len(initial_analysis_report.vulnerability_types):\n\n                for vuln_type in initial_analysis_report.vulnerability_types:\n\n                    # Do not fetch the context code on the first pass of the secondary analysis because the context will be from the general analysis\n                    stored_code_definitions = {}\n                    definitions = CodeDefinitions(definitions=[])\n                    same_context = False\n\n                    # Don't include the initial analysis or the first iteration of the secondary analysis in the user_prompt\n                    previous_analysis = ''\n                    previous_context_amount = 0\n\n                    for i in range(7):\n                        log.info(f\"Performing vuln-specific analysis\", iteration=i, vuln_type=vuln_type, file=py_f)\n\n                        # Only lookup context code and previous analysis on second pass and onwards\n                        if i > 0:\n                            previous_context_amount = len(stored_code_definitions)\n                            previous_analysis = secondary_analysis_report.analysis\n\n                            for context_item in secondary_analysis_report.context_code:\n                                # Make sure bot isn't requesting the same code multiple times\n                                if context_item.name not in stored_code_definitions:\n                                    name = context_item.name\n                                    code_line = context_item.code_line\n                                    match = code_extractor.extract(name, code_line, files)\n                                    if match:\n                                        stored_code_definitions[name] = match\n\n                            code_definitions = list(stored_code_definitions.values())\n                            definitions = CodeDefinitions(definitions=code_definitions)\n                            \n                            if args.verbosity > 1:\n                                for definition in definitions.definitions:\n                                    if '\\n' in definition.source:\n                                        lines = definition.source.split('\\n')\n                                        snippet = lines[0] + '\\n' + lines[1]\n                                    else:\n                                        snippet = definition.source[:75]\n                                    \n                                    print(f\"Name: {definition.name}\")\n                                    print(f\"Context search: {definition.context_name_requested}\")\n                                    print(f\"File Path: {definition.file_path}\")\n                                    print(f\"First two lines from source: {snippet}\\n\")\n\n                        vuln_specific_user_prompt = (\n                            FileCode(file_path=str(py_f), file_source=content).to_xml() + b'\\n' +\n                            definitions.to_xml() + b'\\n' +  # These are all the requested context functions and classes\n                            ExampleBypasses(\n                                example_bypasses='\\n'.join(VULN_SPECIFIC_BYPASSES_AND_PROMPTS[vuln_type]['bypasses'])\n                            ).to_xml() + b'\\n' +\n                            Instructions(instructions=VULN_SPECIFIC_BYPASSES_AND_PROMPTS[vuln_type]['prompt']).to_xml() + b'\\n' +\n                            AnalysisApproach(analysis_approach=ANALYSIS_APPROACH_TEMPLATE).to_xml() + b'\\n' +\n                            PreviousAnalysis(previous_analysis=previous_analysis).to_xml() + b'\\n' +\n                            Guidelines(guidelines=GUIDELINES_TEMPLATE).to_xml() + b'\\n' +\n                            ResponseFormat(\n                                response_format=json.dumps(\n                                    Response.model_json_schema(), indent=4\n                                )\n                            ).to_xml()\n                        ).decode()\n\n                        secondary_analysis_report: Response = llm.chat(vuln_specific_user_prompt, response_model=Response)\n                        log.info(\"Secondary analysis complete\", secondary_analysis_report=secondary_analysis_report.model_dump())\n\n                        if args.verbosity > 0:\n                            print_readable(secondary_analysis_report)\n\n                        if not len(secondary_analysis_report.context_code):\n                            log.debug(\"No new context functions or classes found\")\n                            if args.verbosity == 0:\n                                print_readable(secondary_analysis_report)\n                            break\n                        \n                        # Check if any new context code is requested\n                        if previous_context_amount >= len(stored_code_definitions) and i > 0:\n                            # Let it request the same context once, then on the second time it requests the same context, break\n                            if same_context:\n                                log.debug(\"No new context functions or classes requested\")\n                                if args.verbosity == 0:\n                                    print_readable(secondary_analysis_report)\n                                break\n                            same_context = True\n                            log.debug(\"No new context functions or classes requested\")\n                    pass\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/protectai/vulnhuntr/blob/ead88c5adba4279dae5c56d65124c530a9a1c5ae/vulnhuntr/__main__.py#L320-L486",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F224"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=pydantic-xml%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F209"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from pydantic_xml import BaseXmlModel, element\n\nclass Message(BaseXmlModel, tag=\"message\"):\n    text: str = element()\n\nmessage = Message.from_xml(b\"<message><text>Hello</text></message>\")\nprint(message.text)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pydantic-xml.readthedocs.io/en/latest/pages/quickstart.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "quickstart.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F214"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "untangle",
          "name": [
            {
              "t": "fact",
              "fact": "F227"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/stchris/untangle"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/untangle"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/untangle/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F234"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/untangle/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F227"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/cloudbase/cloudbase-init",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F243"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _wire_server_request(self, path, data_xml=None, headers=None,\n                         parse_xml=True):\n    if not self._base_url:\n        raise exception.CloudbaseInitException(\n            \"Azure WireServer base url not set\")\n\n    all_headers = self._headers.copy()\n    if data_xml:\n        all_headers[\"Content-Type\"] = \"text/xml; charset=utf-8\"\n    if headers:\n        all_headers.update(headers)\n\n    data = self._exec_with_retry(\n        lambda: super(AzureService, self)._http_request(\n            path, data_xml, headers=all_headers))\n\n    if parse_xml:\n        return untangle.parse(io.StringIO(encoding.get_as_string(data)))\n    else:\n        return data",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/cloudbase/cloudbase-init/blob/49a8c87549df935140982455c916125a9574c077/cloudbaseinit/metadata/services/azureservice.py#L101-L120",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F242"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=untangle%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F227"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import untangle\nmessage = untangle.parse('<message>Hello</message>')\nprint(message.message.cdata)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/stchris/untangle/blob/d389e335e5f9a0d47784f5b71afe4ecbc0e4baf3/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F232"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python XML library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#lxml",
          "label": [
            {
              "t": "text",
              "text": "lxml"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits building, editing, and parsing XML trees with the ElementTree API. "
        },
        {
          "t": "link",
          "href": "#defusedxml",
          "label": [
            {
              "t": "text",
              "text": "defusedxml"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits untrusted XML that may declare entities. "
        },
        {
          "t": "link",
          "href": "#xmltodict",
          "label": [
            {
              "t": "text",
              "text": "xmltodict"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits code that works with XML as Python dictionaries."
        }
      ]
    },
    {
      "q": "What is lxml?",
      "a": [
        {
          "t": "link",
          "href": "#lxml",
          "label": [
            {
              "t": "text",
              "text": "lxml"
            }
          ]
        },
        {
          "t": "text",
          "text": " parses, edits, and serializes XML trees with the ElementTree API. It also parses large inputs incrementally."
        }
      ]
    },
    {
      "q": "What is xmltodict?",
      "a": [
        {
          "t": "link",
          "href": "#xmltodict",
          "label": [
            {
              "t": "text",
              "text": "xmltodict"
            }
          ]
        },
        {
          "t": "text",
          "text": " converts XML documents to dictionaries and writes dictionaries back as XML. Round-trips may not preserve mixed content order, attribute order, or comment placement."
        }
      ]
    },
    {
      "q": "How do I parse untrusted XML safely in Python?",
      "a": [
        {
          "t": "link",
          "href": "#defusedxml",
          "label": [
            {
              "t": "text",
              "text": "defusedxml"
            }
          ]
        },
        {
          "t": "text",
          "text": " provides protected parsing functions that reject declared entities and external references by default."
        }
      ]
    },
    {
      "q": "lxml vs Beautiful Soup: which should I use for XML?",
      "a": [
        {
          "t": "link",
          "href": "#lxml",
          "label": [
            {
              "t": "text",
              "text": "lxml"
            }
          ]
        },
        {
          "t": "text",
          "text": " builds and edits XML trees directly. "
        },
        {
          "t": "link",
          "href": "#beautiful-soup",
          "label": [
            {
              "t": "text",
              "text": "Beautiful Soup"
            }
          ]
        },
        {
          "t": "text",
          "text": " navigates XML with CSS selectors and needs lxml as its XML parser."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, lxml",
      "display": "lxml",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, lxml",
      "display": "316.1M",
      "asOf": "2026-11-12"
    },
    "F3": {
      "label": "License, lxml",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, lxml",
      "display": "6.1.3, Sep 2026",
      "asOf": "2026-09-02"
    },
    "F5": {
      "label": "Package release date, lxml",
      "display": "Sep 2026",
      "asOf": "2026-09-02"
    },
    "F6": {
      "label": "Repository stars, lxml",
      "display": "3.1K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Parse XML, lxml",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Namespaces, lxml",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Write XML, lxml",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Streaming, lxml",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Output formats, lxml",
      "display": "XML",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "Install, lxml",
      "display": "pip install lxml",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "What it does, lxml",
      "display": "Parses, edits, and serializes XML trees with the ElementTree API.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, lxml",
      "display": "Builds and edits XML trees",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, lxml",
      "display": "Create elements, modify the tree, and serialize XML through ElementTree APIs.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths lead, lxml",
      "display": "Parses large inputs incrementally",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "strengths, lxml",
      "display": "Process input in steps rather than waiting for the entire document.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, lxml",
      "display": "Streaming still builds a tree",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, lxml",
      "display": "Clear processed elements when large inputs should not remain in memory.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Quickstart, lxml",
      "display": "from lxml import etree\nroot = etree.Element(\"root\")\nroot.append( etree.Element(\"child1\") )\nchild2 = etree.SubElement(root, \"child2\")\nchild3 = etree.SubElement(root, \"child3\")\netree.tostring(root)\nchild = root[0]\nprint(child.tag)\nprint(len(root))\nroot.index(root[1])  # lxml.etree only!\nchildren = list(root)\nfor child in root:\n    print(child.tag)\nroot.insert(0, etree.Element(\"child0\"))\nstart = root[:1]\nend   = root[-1:]\nprint(start[0].tag)\nprint(end[0].tag)\n",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project function, lxml",
      "display": "def create_root_node(\n    text: str,\n    parser_cls: type[_ParserType],\n    base_url: str | None = None,\n    huge_tree: bool = True,\n    body: bytes = b\"\",\n    encoding: str = \"utf-8\",\n) -> etree._Element:\n    \"\"\"Create root node for text using given parser class.\"\"\"\n    if text:\n        body = text.strip().replace(\"\\x00\", \"\").encode(encoding) or b\"<html/>\"\n    elif codecs.lookup(encoding).name != \"utf-8\":\n        # lxml handles bytes that the declared encoding cannot decode by\n        # truncating the document there, and characters that span several\n        # bytes, as in UTF-16, are broken by the null and whitespace stripping\n        # below. Only UTF-8 bytes are passed as is, since lxml does report\n        # invalid UTF-8, and it covers most input.\n        return _root_from_decoded_body(body, parser_cls, base_url, huge_tree, encoding)\n    else:\n        body = body.replace(b\"\\x00\", b\"\").strip() or b\"<html/>\"\n\n    parser = parser_cls(recover=True, encoding=encoding, huge_tree=huge_tree)\n    root = None\n    try:\n        root = etree.fromstring(body, parser=parser, base_url=base_url)\n    except etree.XMLSyntaxError:\n        if text or not _has_encoding_error(parser):\n            raise\n    if not text and _has_encoding_error(parser):\n        # Invalid bytes reach the tree as is, and reading them raises\n        # UnicodeDecodeError from lxml.\n        return _root_from_decoded_body(body, parser_cls, base_url, huge_tree, encoding)\n    if not huge_tree:\n        for error in parser.error_log:\n            if \"use XML_PARSE_HUGE option\" in error.message:\n                warnings.warn(\n                    \"Input data is too big. Set huge_tree=True for huge_tree support.\",\n                    stacklevel=2,\n                )\n    if root is None:\n        root = etree.fromstring(b\"<html/>\", parser=parser, base_url=base_url)\n    return root\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function reference, lxml",
      "display": "selector.py · create_root_node()",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project repository, lxml",
      "display": "scrapy/parsel",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project stars, scrapy/parsel",
      "display": "1.4K",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project push date, scrapy/parsel",
      "display": "Nov 2026",
      "asOf": "2026-11-01"
    },
    "F26": {
      "label": "Library name, beautifulsoup4",
      "display": "Beautiful Soup",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Monthly downloads, beautifulsoup4",
      "display": "289.6M",
      "asOf": "2026-11-12"
    },
    "F28": {
      "label": "License, beautifulsoup4",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Package release, beautifulsoup4",
      "display": "4.15.0, Jun 2026",
      "asOf": "2026-06-07"
    },
    "F30": {
      "label": "Package release date, beautifulsoup4",
      "display": "Jun 2026",
      "asOf": "2026-06-07"
    },
    "F31": {
      "label": "Parse XML, beautifulsoup4",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Namespaces, beautifulsoup4",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Write XML, beautifulsoup4",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Output formats, beautifulsoup4",
      "display": "XML",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Install, beautifulsoup4",
      "display": "pip install beautifulsoup4 lxml",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "What it does, beautifulsoup4",
      "display": "Navigates, searches, and modifies XML or HTML parse trees.",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "strengths lead, beautifulsoup4",
      "display": "Navigates XML with CSS selectors",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths, beautifulsoup4",
      "display": "Select namespaced XML elements with familiar CSS selector syntax.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, beautifulsoup4",
      "display": "Uses one markup-navigation interface",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, beautifulsoup4",
      "display": "Search and modify parse trees through the same Beautiful Soup interface.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "limitations lead, beautifulsoup4",
      "display": "XML parsing requires lxml",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations, beautifulsoup4",
      "display": "Install lxml and request the XML parser explicitly for XML input.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "Quickstart, beautifulsoup4",
      "display": "from bs4 import BeautifulSoup\nxml = \"\"\"<tag xmlns:ns1=\"http://namespace1/\" xmlns:ns2=\"http://namespace2/\">\n <ns1:child>I'm in namespace 1</ns1:child>\n <ns2:child>I'm in namespace 2</ns2:child>\n</tag> \"\"\"\nnamespace_soup = BeautifulSoup(xml, \"xml\")\n\nnamespace_soup.css.select(\"child\")\n# [<ns1:child>I'm in namespace 1</ns1:child>, <ns2:child>I'm in namespace 2</ns2:child>]\n\nnamespace_soup.css.select(\"ns1|child\")\n# [<ns1:child>I'm in namespace 1</ns1:child>]\n",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "Project function, beautifulsoup4",
      "display": "def select_form(self, selector=\"form\", nr=0):\n    # ...\n    if self.page is None:\n        raise AttributeError(\n            \"No page has been opened yet on this browser, or the last \"\n            \"response was not parsed as a page (e.g. it was not HTML).\"\n        )\n\n    def find_associated_elements(form_id, page):\n        \"\"\"Find all elements associated to a form\n            (i.e. an element with a form attribute -> ``form=form_id``)\n        \"\"\"\n\n        # Elements which can have a form owner\n        elements_with_owner_form = (\"input\", \"button\", \"fieldset\",\n                                    \"object\", \"output\", \"select\",\n                                    \"textarea\")\n\n        found_elements = []\n\n        for element in elements_with_owner_form:\n            found_elements.extend(\n                page.find_all(element, form=form_id)\n            )\n        return found_elements\n\n    if isinstance(selector, bs4.element.Tag):\n        if selector.name != \"form\":\n            raise LinkNotFoundError\n        form = selector\n    else:\n        # nr is a 0-based index for consistency with mechanize\n        found_forms = self.page.select(selector,\n                                       limit=nr + 1)\n        if len(found_forms) != nr + 1:\n            if self.__debug:\n                print('select_form failed for', selector)\n                self.launch_browser()\n            raise LinkNotFoundError()\n\n        form = found_forms[-1]\n\n    if form and form.has_attr('id'):\n        new_elements = find_associated_elements(form.get(\"id\"), self.page)\n        form.extend(new_elements)\n\n    self.__state.form = Form(form)\n\n    return self.form\n",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "Project function reference, beautifulsoup4",
      "display": "stateful_browser.py · select_form()",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Project repository, beautifulsoup4",
      "display": "MechanicalSoup/MechanicalSoup",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project stars, MechanicalSoup/MechanicalSoup",
      "display": "4.9K",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project push date, MechanicalSoup/MechanicalSoup",
      "display": "Oct 2026",
      "asOf": "2026-10-07"
    },
    "F49": {
      "label": "Library name, defusedxml",
      "display": "defusedxml",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Monthly downloads, defusedxml",
      "display": "197.9M",
      "asOf": "2026-11-12"
    },
    "F51": {
      "label": "License, defusedxml",
      "display": "PSFL",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Package release, defusedxml",
      "display": "0.7.1, Mar 2021",
      "asOf": "2021-03-08"
    },
    "F53": {
      "label": "Package release date, defusedxml",
      "display": "Mar 2021",
      "asOf": "2021-03-08"
    },
    "F54": {
      "label": "Repository stars, defusedxml",
      "display": "559",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Parse XML, defusedxml",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Namespaces, defusedxml",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Write XML, defusedxml",
      "display": "Unsupported",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Streaming, defusedxml",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Install, defusedxml",
      "display": "pip install defusedxml",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "What it does, defusedxml",
      "display": "Provides protected XML parsing functions compatible with standard-library parser objects.",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "strengths lead, defusedxml",
      "display": "Blocks entity declarations by default",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "strengths, defusedxml",
      "display": "The default parser settings reject declared entities and external references.",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths lead, defusedxml",
      "display": "Keeps standard-library object compatibility",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths, defusedxml",
      "display": "Use returned parser objects with compatible standard-library XML APIs.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "limitations lead, defusedxml",
      "display": "Writing XML uses standard-library APIs",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "limitations, defusedxml",
      "display": "Use standard-library serializers for tree creation and XML output.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations lead, defusedxml",
      "display": "DTD rejection needs explicit configuration",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations, defusedxml",
      "display": "Set forbid_dtd=True when documents containing any DTD must be rejected.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "Quickstart, defusedxml",
      "display": "from defusedxml import ElementTree as DET\nroot = DET.fromstring(\"<root/>\")\n",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "Project function, defusedxml",
      "display": "def __loadxmlparts(z, manifest, doc, objectpath):\n    # ...\n    assert(isinstance(z, zipfile.ZipFile))\n    assert(type(manifest) == type(dict()))\n    assert(isinstance(doc, OpenDocument))\n    assert(type(objectpath) == type(u\"\"))\n\n    from odf.load import LoadParser\n    from defusedxml.sax import make_parser\n    from xml.sax import handler\n\n    for xmlfile in (objectpath+u'settings.xml', objectpath+u'meta.xml', objectpath+u'content.xml', objectpath+u'styles.xml'):\n        if xmlfile not in manifest:\n            continue\n        ##########################################################\n        # this one is added to debug the bad behavior with Python2\n        # which raises exceptions of type SAXParseException\n        from xml.sax._exceptions import SAXParseException\n        ##########################################################\n        try:\n            xmlpart = z.read(xmlfile).decode(\"utf-8\")\n            doc._parsing = xmlfile\n\n            parser = make_parser()\n            parser.setFeature(handler.feature_namespaces, 1)\n            parser.setFeature(handler.feature_external_ges, 0)\n            parser.setContentHandler(LoadParser(doc))\n            parser.setErrorHandler(handler.ErrorHandler())\n\n            inpsrc = InputSource()\n            #################\n            # There may be a SAXParseException triggered because of\n            # a missing xmlns prefix like meta, config, etc.\n            # So i add such declarations when needed (GK, 2014/10/21).\n            # Is there any option to prevent xmlns checks by SAX?\n            xmlpart = __fixXmlPart(xmlpart)\n\n            inpsrc.setByteStream(BytesIO(xmlpart.encode(\"utf-8\")))\n            parser.parse(inpsrc)\n            del doc._parsing\n        except KeyError as v: pass\n        except SAXParseException:\n            print (u\"====== SAX FAILED TO PARSE ==========\\n\", xmlpart)\n",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Project function reference, defusedxml",
      "display": "opendocument.py · __loadxmlparts()",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project repository, defusedxml",
      "display": "eea/odfpy",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project stars, eea/odfpy",
      "display": "368",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project push date, eea/odfpy",
      "display": "Nov 2026",
      "asOf": "2026-11-04"
    },
    "F75": {
      "label": "Library name, xmltodict",
      "display": "xmltodict",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Monthly downloads, xmltodict",
      "display": "93.0M",
      "asOf": "2026-11-12"
    },
    "F77": {
      "label": "License, xmltodict",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Package release, xmltodict",
      "display": "1.0.4, Feb 2026",
      "asOf": "2026-02-22"
    },
    "F79": {
      "label": "Package release date, xmltodict",
      "display": "Feb 2026",
      "asOf": "2026-02-22"
    },
    "F80": {
      "label": "Repository stars, xmltodict",
      "display": "5.8K",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Parse XML, xmltodict",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Namespaces, xmltodict",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Write XML, xmltodict",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Streaming, xmltodict",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Output formats, xmltodict",
      "display": "XML",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Install, xmltodict",
      "display": "pip install xmltodict",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "What it does, xmltodict",
      "display": "Converts XML documents to dictionaries and writes dictionaries as XML.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths lead, xmltodict",
      "display": "Writes dictionaries back as XML",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths, xmltodict",
      "display": "Use unparse to generate XML from a Python dictionary.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths lead, xmltodict",
      "display": "Streams records through callbacks",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths, xmltodict",
      "display": "Process records with item_depth and item_callback for large XML inputs.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "limitations lead, xmltodict",
      "display": "Round-trips can change document structure",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "limitations, xmltodict",
      "display": "Mixed content order, attribute order, and comment placement are not fully preserved.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations lead, xmltodict",
      "display": "Namespaces need explicit processing",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations, xmltodict",
      "display": "Enable process_namespaces when namespace URIs must be expanded.",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Quickstart, xmltodict",
      "display": "import xmltodict\nmydict = {\n    'text': {\n        '@color':'red',\n        '@stroke':'2',\n        '#text':'This is a test'\n    }\n}\nprint(xmltodict.unparse(mydict, pretty=True))\nxml = '<a><b>data1</b><c>data2</c><d>data3</d></a>'\n# Force CDATA only for 'b' and 'd' elements\nxmltodict.parse(xml, force_cdata=('b', 'd'))\n# Force CDATA for all elements (original behavior)\nxmltodict.parse(xml, force_cdata=True)\n# Use a callable for complex logic\ndef should_force_cdata(path, key, value):\n    return key in ['b', 'd'] and len(value) > 4\nxmltodict.parse(xml, force_cdata=should_force_cdata)\n",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Developer need",
      "display": "XML trees and serialization",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Why choose lxml",
      "display": "ElementTree APIs",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Developer need in introduction",
      "display": "XML trees and serialization",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need",
      "display": "XML and dictionary conversion",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Why choose xmltodict",
      "display": "dictionary output",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need in introduction",
      "display": "XML and dictionary conversion",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Developer need",
      "display": "Protected XML parsing",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Why choose defusedxml",
      "display": "entity restrictions",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Developer need in introduction",
      "display": "protected XML parsing",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need",
      "display": "Markup navigation with CSS",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Why choose beautifulsoup4",
      "display": "namespace selectors",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need in introduction",
      "display": "markup navigation with CSS",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Page introduction",
      "display": "Python XML libraries let developers read or write XML documents.",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Library name, lxml",
      "display": "lxml",
      "asOf": "2026-11-20"
    },
    "F111": {
      "label": "Monthly downloads, lxml",
      "display": "445.4M",
      "asOf": "2026-11-20"
    },
    "F112": {
      "label": "License, lxml",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F113": {
      "label": "Package release, lxml",
      "display": "6.1.3",
      "asOf": "2026-11-20"
    },
    "F114": {
      "label": "Package release date, lxml",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F115": {
      "label": "Install, lxml",
      "display": "pip install lxml",
      "asOf": "2026-11-20"
    },
    "F116": {
      "label": "Quickstart, lxml",
      "display": "from lxml import etree\nroot = etree.fromstring(b'<message>Hello</message>')\nprint(root.text)\n",
      "asOf": "2026-11-20"
    },
    "F117": {
      "label": "Repository stars, lxml",
      "display": "3.1K",
      "asOf": "2026-11-20"
    },
    "F118": {
      "label": "Native XSD validation, lxml",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F119": {
      "label": "Nested dictionary output, lxml",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F120": {
      "label": "Namespace URI matching, lxml",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F121": {
      "label": "Tree and query model, lxml",
      "display": "ElementTree nodes, XPath 1.0, and XSLT 1.0",
      "asOf": "2026-11-20"
    },
    "F122": {
      "label": "Project function, lxml",
      "display": "def create_root_node(\n    text: str,\n    parser_cls: type[_ParserType],\n    base_url: str | None = None,\n    huge_tree: bool = True,\n    body: bytes = b\"\",\n    encoding: str = \"utf-8\",\n) -> etree._Element:\n    \"\"\"Create root node for text using given parser class.\"\"\"\n    if text:\n        body = text.strip().replace(\"\\x00\", \"\").encode(encoding) or b\"<html/>\"\n    elif codecs.lookup(encoding).name != \"utf-8\":\n        # lxml handles bytes that the declared encoding cannot decode by\n        # truncating the document there, and characters that span several\n        # bytes, as in UTF-16, are broken by the null and whitespace stripping\n        # below. Only UTF-8 bytes are passed as is, since lxml does report\n        # invalid UTF-8, and it covers most input.\n        return _root_from_decoded_body(body, parser_cls, base_url, huge_tree, encoding)\n    else:\n        body = body.replace(b\"\\x00\", b\"\").strip() or b\"<html/>\"\n\n    parser = parser_cls(recover=True, encoding=encoding, huge_tree=huge_tree)\n    root = None\n    try:\n        root = etree.fromstring(body, parser=parser, base_url=base_url)\n    except etree.XMLSyntaxError:\n        if text or not _has_encoding_error(parser):\n            raise\n    if not text and _has_encoding_error(parser):\n        # Invalid bytes reach the tree as is, and reading them raises\n        # UnicodeDecodeError from lxml.\n        return _root_from_decoded_body(body, parser_cls, base_url, huge_tree, encoding)\n    if not huge_tree:\n        for error in parser.error_log:\n            if \"use XML_PARSE_HUGE option\" in error.message:\n                warnings.warn(\n                    \"Input data is too big. Set huge_tree=True for huge_tree support.\",\n                    stacklevel=2,\n                )\n    if root is None:\n        root = etree.fromstring(b\"<html/>\", parser=parser, base_url=base_url)\n    return root",
      "asOf": "2026-11-20"
    },
    "F123": {
      "label": "Project source file, lxml",
      "display": "parsel/selector.py",
      "asOf": "2026-11-20"
    },
    "F124": {
      "label": "Project full_name, lxml",
      "display": "scrapy/parsel",
      "asOf": "2026-11-20"
    },
    "F125": {
      "label": "Project stargazers_count, lxml",
      "display": "1.4K",
      "asOf": "2026-11-20"
    },
    "F126": {
      "label": "Library name, beautifulsoup4",
      "display": "Beautiful Soup",
      "asOf": "2026-11-20"
    },
    "F127": {
      "label": "Monthly downloads, beautifulsoup4",
      "display": "320.8M",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "License, beautifulsoup4",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Package release, beautifulsoup4",
      "display": "4.15.0",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Package release date, beautifulsoup4",
      "display": "Jun 2026",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Install, beautifulsoup4",
      "display": "pip install beautifulsoup4 lxml",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Quickstart, beautifulsoup4",
      "display": "from bs4 import BeautifulSoup\nsoup = BeautifulSoup('<message>Hello</message>', 'xml')\nprint(soup.message.get_text())\n",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Native XSD validation, beautifulsoup4",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Nested dictionary output, beautifulsoup4",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Namespace URI matching, beautifulsoup4",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "XML engine, beautifulsoup4",
      "display": "Beautiful Soup search façade over lxml XML parser",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Project function, beautifulsoup4",
      "display": "def parse_sitemap(self, soup: Any, *, depth: int = 0) -> List[dict]:\n    \"\"\"Parse sitemap xml and load into a list of dicts.\n\n    Args:\n        soup: BeautifulSoup object.\n        depth: current depth of the sitemap. Default: 0\n\n    Returns:\n        List of dicts.\n    \"\"\"\n    if depth >= self.max_depth:\n        return []\n\n    els: List[Dict] = []\n\n    for url in soup.find_all(\"url\"):\n        loc = url.find(\"loc\")\n        if not loc:\n            continue\n\n        # Strip leading and trailing whitespace and newlines\n        loc_text = loc.text.strip()\n\n        if self.restrict_to_same_domain and not self.is_local:\n            if _extract_scheme_and_domain(loc_text) != _extract_scheme_and_domain(\n                self.web_path\n            ):\n                continue\n\n        if self.allow_url_patterns and not any(\n            re.match(regexp_pattern, loc_text)\n            for regexp_pattern in self.allow_url_patterns\n        ):\n            continue\n\n        els.append(\n            {\n                tag: prop.text.strip()\n                for tag in [\"loc\", \"lastmod\", \"changefreq\", \"priority\"]\n                if (prop := url.find(tag))\n            }\n        )\n\n    for sitemap in soup.find_all(\"sitemap\"):\n        loc = sitemap.find(\"loc\")\n        if not loc:\n            continue\n\n        soup_child = self.scrape_all([loc.text], \"xml\")[0]\n        els.extend(self.parse_sitemap(soup_child, depth=depth + 1))\n    return els",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Project source file, beautifulsoup4",
      "display": "libs/community/langchain_community/document_loaders/sitemap.py",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Project full_name, beautifulsoup4",
      "display": "langchain-ai/langchain-community",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Project stargazers_count, beautifulsoup4",
      "display": "285",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Library name, defusedxml",
      "display": "defusedxml",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Monthly downloads, defusedxml",
      "display": "276.9M",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "License, defusedxml",
      "display": "PSF-2.0",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Package release, defusedxml",
      "display": "0.7.1",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Package release date, defusedxml",
      "display": "Mar 2021",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Install, defusedxml",
      "display": "pip install defusedxml",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Quickstart, defusedxml",
      "display": "from defusedxml.ElementTree import fromstring\nroot = fromstring('<message>Hello</message>')\nprint(root.text)\n",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Repository stars, defusedxml",
      "display": "559",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Native XSD validation, defusedxml",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Nested dictionary output, defusedxml",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Namespace URI matching, defusedxml",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Security scope, defusedxml",
      "display": "Entity/external-resource defenses for compatible stdlib parsers",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Project function, defusedxml",
      "display": "def convert(\n    self,\n    file_stream: BinaryIO,\n    stream_info: StreamInfo,\n    **kwargs: Any,  # Options to pass to the converter\n) -> DocumentConverterResult:\n    with zipfile.ZipFile(file_stream, \"r\") as z:\n        # Extracts metadata (title, authors, language, publisher, date, description, cover) from an EPUB file.\n\n        # Locate content.opf\n        container_dom = minidom.parse(z.open(\"META-INF/container.xml\"))\n        opf_path = container_dom.getElementsByTagName(\"rootfile\")[0].getAttribute(\n            \"full-path\"\n        )\n\n        # Parse content.opf\n        opf_dom = minidom.parse(z.open(opf_path))\n        metadata: Dict[str, Any] = {\n            \"title\": self._get_text_from_node(opf_dom, \"dc:title\"),\n            \"authors\": self._get_all_texts_from_nodes(opf_dom, \"dc:creator\"),\n            \"language\": self._get_text_from_node(opf_dom, \"dc:language\"),\n            \"publisher\": self._get_text_from_node(opf_dom, \"dc:publisher\"),\n            \"date\": self._get_text_from_node(opf_dom, \"dc:date\"),\n            \"description\": self._get_text_from_node(opf_dom, \"dc:description\"),\n            \"identifier\": self._get_text_from_node(opf_dom, \"dc:identifier\"),\n        }\n\n        # Extract manifest items (ID → href mapping)\n        manifest = {\n            item.getAttribute(\"id\"): item.getAttribute(\"href\")\n            for item in opf_dom.getElementsByTagName(\"item\")\n        }\n\n        # Extract spine order (ID refs)\n        spine_items = opf_dom.getElementsByTagName(\"itemref\")\n        spine_order = [item.getAttribute(\"idref\") for item in spine_items]\n\n        # Convert spine order to actual file paths\n        base_path = \"/\".join(\n            opf_path.split(\"/\")[:-1]\n        )  # Get base directory of content.opf\n        zip_names = set(z.namelist())\n        spine = [\n            self._resolve_manifest_href(manifest[item_id], base_path, zip_names)\n            for item_id in spine_order\n            if item_id in manifest\n        ]\n\n        # Extract and convert the content\n        markdown_content: List[str] = []\n        for file in spine:\n            if file in z.namelist():\n                with z.open(file) as f:\n                    filename = os.path.basename(file)\n                    extension = os.path.splitext(filename)[1].lower()\n                    mimetype = MIME_TYPE_MAPPING.get(extension)\n                    converted_content = self._html_converter.convert(\n                        f,\n                        StreamInfo(\n                            mimetype=mimetype,\n                            extension=extension,\n                            filename=filename,\n                        ),\n                        **kwargs,\n                    )\n                    markdown_content.append(converted_content.markdown.strip())\n\n        # Format and add the metadata\n        metadata_markdown = []\n        for key, value in metadata.items():\n            if isinstance(value, list):\n                value = \", \".join(value)\n            if value:\n                metadata_markdown.append(f\"**{key.capitalize()}:** {value}\")\n\n        markdown_content.insert(0, \"\\n\".join(metadata_markdown))\n\n        return DocumentConverterResult(\n            markdown=\"\\n\\n\".join(markdown_content), title=metadata[\"title\"]\n        )",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Project source file, defusedxml",
      "display": "packages/markitdown/src/markitdown/converters/_epub_converter.py",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Project full_name, defusedxml",
      "display": "microsoft/markitdown",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Project stargazers_count, defusedxml",
      "display": "196.6K",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Library name, xmltodict",
      "display": "xmltodict",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Monthly downloads, xmltodict",
      "display": "116.3M",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "License, xmltodict",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Package release, xmltodict",
      "display": "1.0.4",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Package release date, xmltodict",
      "display": "Feb 2026",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Install, xmltodict",
      "display": "pip install xmltodict",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Quickstart, xmltodict",
      "display": "import xmltodict\ndata = xmltodict.parse('<message>Hello</message>')\nprint(data['message'])\n",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Repository stars, xmltodict",
      "display": "5.8K",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Native XSD validation, xmltodict",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Nested dictionary output, xmltodict",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Namespace URI matching, xmltodict",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Round-trip boundary, xmltodict",
      "display": "Dictionary-oriented XML conversion",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Project function, xmltodict",
      "display": "def _bucket_tagging_from_body(self) -> dict[str, str]:\n    parsed_xml = xmltodict.parse(self.body)\n\n    tags = {}\n    # Optional if no tags are being sent:\n    if parsed_xml[\"Tagging\"].get(\"TagSet\"):\n        # If there is only 1 tag, then it's not a list:\n        if not isinstance(parsed_xml[\"Tagging\"][\"TagSet\"][\"Tag\"], list):\n            tags[parsed_xml[\"Tagging\"][\"TagSet\"][\"Tag\"][\"Key\"]] = parsed_xml[\n                \"Tagging\"\n            ][\"TagSet\"][\"Tag\"][\"Value\"]\n        else:\n            for tag in parsed_xml[\"Tagging\"][\"TagSet\"][\"Tag\"]:\n                if tag[\"Key\"] in tags:\n                    raise DuplicateTagKeys()\n                tags[tag[\"Key\"]] = tag[\"Value\"]\n\n    # Verify that \"aws:\" is not in the tags. If so, then this is a problem:\n    for key, _ in tags.items():\n        if key.startswith(\"aws:\"):\n            raise NoSystemTags()\n\n    return tags",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Project source file, xmltodict",
      "display": "moto/s3/responses.py",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Project full_name, xmltodict",
      "display": "getmoto/moto",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Project stargazers_count, xmltodict",
      "display": "8.8K",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Library name, xmlschema",
      "display": "xmlschema",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Monthly downloads, xmlschema",
      "display": "7.6M",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "License, xmlschema",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Package release, xmlschema",
      "display": "4.3.2",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Package release date, xmlschema",
      "display": "Jun 2026",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Install, xmlschema",
      "display": "pip install xmlschema",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Quickstart, xmlschema",
      "display": "import xmlschema\nschema = xmlschema.XMLSchema('<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"><xs:element name=\"message\" type=\"xs:string\"/></xs:schema>')\nschema.validate('<message>Hello</message>')\n",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Official description, xmlschema",
      "display": "Validates and decodes XML Schema documents.",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Quickstart source file, xmlschema",
      "display": "usage.html (API recipe)",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Repository stars, xmlschema",
      "display": "475",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Native XSD validation, xmlschema",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Nested dictionary output, xmlschema",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Namespace URI matching, xmlschema",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Schema versions, xmlschema",
      "display": "XSD 1.0 and XSD 1.1 classes",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Project function, xmlschema",
      "display": "def validate_scenario_schema(scenario_info):\n    \"\"\"\n    Validate settings in scenario xml if there is scenario schema\n    :param xsd_doc: scenario schema\n    :param scenario_info: scenario file\n    \"\"\"\n\n    \"\"\"\n    XMLSchema does not process XInclude.\n    Use lxml to expand the schema which is feed to XMLSchema as a string.\n    \"\"\"\n    xsd_doc = parse(acrn_config_utilities.SCENARIO_SCHEMA_FILE)\n    xsd_doc.xinclude()\n    my_schema = xmlschema.XMLSchema11(tostring(xsd_doc, encoding=\"unicode\"))\n\n    it = my_schema.iter_errors(scenario_info)\n    for idx, validation_error in enumerate(it, start=1):\n        key = \"\"\n        if not validation_error:\n            continue\n        else:\n            path = str(validation_error.path).split(\"/\")\n            cnt = 0\n            for p in path:\n                if '[' in p:\n                    idx = int(p.split(\"[\")[1].split(\"]\")[0]) - 1\n                    p = p.split(\"[\")[0] + \":id=\" + str(idx)\n                    path[cnt] = p\n                cnt = cnt + 1\n            key =','.join(path[2:])\n            element = \"'\" + path[-1] + \"' \"\n            reason = validation_error.reason + \": last call: \" + str(validation_error.obj)\n            scenario_cfg_lib.ERR_LIST[key] = element + reason\n",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Project source file, xmlschema",
      "display": "misc/config_tools/scenario_config/scenario_cfg_gen.py",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Project full_name, xmlschema",
      "display": "projectacrn/acrn-hypervisor",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Project stargazers_count, xmlschema",
      "display": "1.3K",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Library name, xsdata",
      "display": "xsdata",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Monthly downloads, xsdata",
      "display": "3.6M",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "License, xsdata",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Package release, xsdata",
      "display": "26.10",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Package release date, xsdata",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Install, xsdata",
      "display": "pip install xsdata",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Quickstart, xsdata",
      "display": "from dataclasses import dataclass, field\nfrom xsdata.formats.dataclass.parsers import XmlParser\n\n@dataclass\nclass Message:\n    class Meta:\n        name = \"message\"\n    text: str = field(default=\"\", metadata={\"type\": \"Text\"})\n\nmessage = XmlParser().from_string(\"<message>Hello</message>\", Message)\nprint(message.text)\n",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Official description, xsdata",
      "display": "Provides XML data binding for Python.",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Quickstart source file, xsdata",
      "display": "data_binding/basics and models/fields (API recipe)",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Repository stars, xsdata",
      "display": "457",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Native XSD validation, xsdata",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Nested dictionary output, xsdata",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Namespace URI matching, xsdata",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Validation boundary, xsdata",
      "display": "Dataclass binding and configurable conversion warnings",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Project function, xsdata",
      "display": "def generate_report(\n    embedded_sig: EmbeddedPdfSignature, status: AdESBasicValidationResult\n) -> str:\n    \"\"\"\n    Generate signature validation report in XML format according to\n    ETSI TS 119 102-2.\n\n    :param embedded_sig:\n        PDF signature to report on.\n    :param status:\n        AdES validation result to turn into a report.\n    :return:\n        A string representation of the validation report.\n    \"\"\"\n    report = ts_11910202.ValidationReport(\n        signature_validation_report=(_generate_report(embedded_sig, status),),\n        signature_validation_objects=ts_11910202.ValidationObjectListType(\n            tuple(\n                _package_validation_object(vo)\n                for vo in status.validation_objects\n            )\n        ),\n    )\n    from xsdata.formats.dataclass.serializers import XmlSerializer\n    from xsdata.formats.dataclass.serializers.config import SerializerConfig\n\n    config = SerializerConfig(indent=\"  \")\n    ser = XmlSerializer(config=config).render(report, ns_map=NAMESPACES)\n    return ser\n",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Project source file, xsdata",
      "display": "pkgs/pyhanko/src/pyhanko/sign/validation/report/tools.py",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Project full_name, xsdata",
      "display": "MatthiasValvekens/pyHanko",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Project stargazers_count, xsdata",
      "display": "802",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Library name, pydantic-xml",
      "display": "pydantic-xml",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Monthly downloads, pydantic-xml",
      "display": "3.1M",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "License, pydantic-xml",
      "display": "Unlicense",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Package release, pydantic-xml",
      "display": "2.22.0",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Package release date, pydantic-xml",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Install, pydantic-xml",
      "display": "pip install pydantic-xml",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Quickstart, pydantic-xml",
      "display": "from pydantic_xml import BaseXmlModel, element\n\nclass Message(BaseXmlModel, tag=\"message\"):\n    text: str = element()\n\nmessage = Message.from_xml(b\"<message><text>Hello</text></message>\")\nprint(message.text)\n",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Official description, pydantic-xml",
      "display": "Extends Pydantic with XML support.",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Quickstart source file, pydantic-xml",
      "display": "pages/quickstart (API recipe)",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Repository stars, pydantic-xml",
      "display": "257",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Native XSD validation, pydantic-xml",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Nested dictionary output, pydantic-xml",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Namespace URI matching, pydantic-xml",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Model validation, pydantic-xml",
      "display": "Pydantic field/model validation with XML bindings",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Project function, pydantic-xml",
      "display": "def run():\n    parser = argparse.ArgumentParser(description='Analyze a GitHub project for vulnerabilities. Export your ANTHROPIC_API_KEY/OPENAI_API_KEY before running.')\n    parser.add_argument('-r', '--root', type=str, required=True, help='Path to the root directory of the project')\n    parser.add_argument('-a', '--analyze', type=str, help='Specific path or file within the project to analyze')\n    parser.add_argument('-l', '--llm', type=str, choices=['claude', 'gpt', 'ollama'], default='claude', help='LLM client to use (default: claude)')\n    parser.add_argument('-v', '--verbosity', action='count', default=0, help='Increase output verbosity (-v for INFO, -vv for DEBUG)')\n    args = parser.parse_args()\n\n    repo = RepoOps(args.root)\n    code_extractor = SymbolExtractor(args.root)\n    # Get repo files that don't include stuff like tests and documentation\n    files = repo.get_relevant_py_files()\n\n    # User specified --analyze flag\n    if args.analyze:\n        # Determine the path to analyze\n        analyze_path = Path(args.analyze)\n\n        # If the path is absolute, use it as is, otherwise join it with the root path so user can specify relative paths\n        if analyze_path.is_absolute():\n            files_to_analyze = repo.get_files_to_analyze(analyze_path)\n        else:\n            files_to_analyze = repo.get_files_to_analyze(Path(args.root) / analyze_path)\n\n    # Analyze the entire project for network-related files\n    else:\n        files_to_analyze = repo.get_network_related_files(files)\n    \n    llm = initialize_llm(args.llm)\n\n    readme_content = repo.get_readme_content()\n    if readme_content:\n        log.info(\"Summarizing project README\")\n        summary = llm.chat(\n            (ReadmeContent(content=readme_content).to_xml() + b'\\n' +\n            Instructions(instructions=README_SUMMARY_PROMPT_TEMPLATE).to_xml()\n            ).decode()\n        )\n        summary = extract_between_tags(\"summary\", summary)[0]\n        log.info(\"README summary complete\", summary=summary)\n    else:\n        log.warning(\"No README summary found\")\n        summary = ''\n    \n    # Initialize the system prompt with the README summary\n    system_prompt = (Instructions(instructions=SYS_PROMPT_TEMPLATE).to_xml() + b'\\n' +\n                ReadmeSummary(readme_summary=summary).to_xml()\n                ).decode()\n    \n    llm = initialize_llm(args.llm, system_prompt)\n\n    # files_to_analyze is either a list of all network-related files or a list containing a single file/dir to analyze\n    for py_f in files_to_analyze:\n        log.info(f\"Performing initial analysis\", file=str(py_f))\n\n        # This is the Initial analysis\n        with py_f.open(encoding='utf-8') as f:\n            content = f.read()\n            if not len(content):\n                continue\n\n            print(f\"\\nAnalyzing {py_f}\")\n            print('-' * 40 +'\\n')\n\n            user_prompt =(\n                    FileCode(file_path=str(py_f), file_source=content).to_xml() + b'\\n' +\n                    Instructions(instructions=INITIAL_ANALYSIS_PROMPT_TEMPLATE).to_xml() + b'\\n' +\n                    AnalysisApproach(analysis_approach=ANALYSIS_APPROACH_TEMPLATE).to_xml() + b'\\n' +\n                    PreviousAnalysis(previous_analysis='').to_xml() + b'\\n' +\n                    Guidelines(guidelines=GUIDELINES_TEMPLATE).to_xml() + b'\\n' +\n                    ResponseFormat(response_format=json.dumps(Response.model_json_schema(), indent=4\n                    )\n                ).to_xml()\n            ).decode()\n\n            initial_analysis_report: Response = llm.chat(user_prompt, response_model=Response)\n            log.info(\"Initial analysis complete\", report=initial_analysis_report.model_dump())\n\n            print_readable(initial_analysis_report)\n\n            # Secondary analysis\n            if initial_analysis_report.confidence_score > 0 and len(initial_analysis_report.vulnerability_types):\n\n                for vuln_type in initial_analysis_report.vulnerability_types:\n\n                    # Do not fetch the context code on the first pass of the secondary analysis because the context will be from the general analysis\n                    stored_code_definitions = {}\n                    definitions = CodeDefinitions(definitions=[])\n                    same_context = False\n\n                    # Don't include the initial analysis or the first iteration of the secondary analysis in the user_prompt\n                    previous_analysis = ''\n                    previous_context_amount = 0\n\n                    for i in range(7):\n                        log.info(f\"Performing vuln-specific analysis\", iteration=i, vuln_type=vuln_type, file=py_f)\n\n                        # Only lookup context code and previous analysis on second pass and onwards\n                        if i > 0:\n                            previous_context_amount = len(stored_code_definitions)\n                            previous_analysis = secondary_analysis_report.analysis\n\n                            for context_item in secondary_analysis_report.context_code:\n                                # Make sure bot isn't requesting the same code multiple times\n                                if context_item.name not in stored_code_definitions:\n                                    name = context_item.name\n                                    code_line = context_item.code_line\n                                    match = code_extractor.extract(name, code_line, files)\n                                    if match:\n                                        stored_code_definitions[name] = match\n\n                            code_definitions = list(stored_code_definitions.values())\n                            definitions = CodeDefinitions(definitions=code_definitions)\n                            \n                            if args.verbosity > 1:\n                                for definition in definitions.definitions:\n                                    if '\\n' in definition.source:\n                                        lines = definition.source.split('\\n')\n                                        snippet = lines[0] + '\\n' + lines[1]\n                                    else:\n                                        snippet = definition.source[:75]\n                                    \n                                    print(f\"Name: {definition.name}\")\n                                    print(f\"Context search: {definition.context_name_requested}\")\n                                    print(f\"File Path: {definition.file_path}\")\n                                    print(f\"First two lines from source: {snippet}\\n\")\n\n                        vuln_specific_user_prompt = (\n                            FileCode(file_path=str(py_f), file_source=content).to_xml() + b'\\n' +\n                            definitions.to_xml() + b'\\n' +  # These are all the requested context functions and classes\n                            ExampleBypasses(\n                                example_bypasses='\\n'.join(VULN_SPECIFIC_BYPASSES_AND_PROMPTS[vuln_type]['bypasses'])\n                            ).to_xml() + b'\\n' +\n                            Instructions(instructions=VULN_SPECIFIC_BYPASSES_AND_PROMPTS[vuln_type]['prompt']).to_xml() + b'\\n' +\n                            AnalysisApproach(analysis_approach=ANALYSIS_APPROACH_TEMPLATE).to_xml() + b'\\n' +\n                            PreviousAnalysis(previous_analysis=previous_analysis).to_xml() + b'\\n' +\n                            Guidelines(guidelines=GUIDELINES_TEMPLATE).to_xml() + b'\\n' +\n                            ResponseFormat(\n                                response_format=json.dumps(\n                                    Response.model_json_schema(), indent=4\n                                )\n                            ).to_xml()\n                        ).decode()\n\n                        secondary_analysis_report: Response = llm.chat(vuln_specific_user_prompt, response_model=Response)\n                        log.info(\"Secondary analysis complete\", secondary_analysis_report=secondary_analysis_report.model_dump())\n\n                        if args.verbosity > 0:\n                            print_readable(secondary_analysis_report)\n\n                        if not len(secondary_analysis_report.context_code):\n                            log.debug(\"No new context functions or classes found\")\n                            if args.verbosity == 0:\n                                print_readable(secondary_analysis_report)\n                            break\n                        \n                        # Check if any new context code is requested\n                        if previous_context_amount >= len(stored_code_definitions) and i > 0:\n                            # Let it request the same context once, then on the second time it requests the same context, break\n                            if same_context:\n                                log.debug(\"No new context functions or classes requested\")\n                                if args.verbosity == 0:\n                                    print_readable(secondary_analysis_report)\n                                break\n                            same_context = True\n                            log.debug(\"No new context functions or classes requested\")\n                    pass\n",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Project source file, pydantic-xml",
      "display": "vulnhuntr/__main__.py",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Project full_name, pydantic-xml",
      "display": "protectai/vulnhuntr",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Project stargazers_count, pydantic-xml",
      "display": "2.8K",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Library name, untangle",
      "display": "untangle",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Monthly downloads, untangle",
      "display": "321.6K",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "License, untangle",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Package release, untangle",
      "display": "1.3.0",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Package release date, untangle",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Install, untangle",
      "display": "pip install untangle",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Quickstart, untangle",
      "display": "import untangle\nmessage = untangle.parse('<message>Hello</message>')\nprint(message.message.cdata)\n",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Official description, untangle",
      "display": "Converts XML to Python objects",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Quickstart source file, untangle",
      "display": "README.md (API recipe)",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Repository stars, untangle",
      "display": "628",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Native XSD validation, untangle",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Nested dictionary output, untangle",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Namespace URI matching, untangle",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Name handling, untangle",
      "display": "Dynamic child attributes and cdata",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Project function, untangle",
      "display": "def _wire_server_request(self, path, data_xml=None, headers=None,\n                         parse_xml=True):\n    if not self._base_url:\n        raise exception.CloudbaseInitException(\n            \"Azure WireServer base url not set\")\n\n    all_headers = self._headers.copy()\n    if data_xml:\n        all_headers[\"Content-Type\"] = \"text/xml; charset=utf-8\"\n    if headers:\n        all_headers.update(headers)\n\n    data = self._exec_with_retry(\n        lambda: super(AzureService, self)._http_request(\n            path, data_xml, headers=all_headers))\n\n    if parse_xml:\n        return untangle.parse(io.StringIO(encoding.get_as_string(data)))\n    else:\n        return data",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Project source file, untangle",
      "display": "cloudbaseinit/metadata/services/azureservice.py",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Project full_name, untangle",
      "display": "cloudbase/cloudbase-init",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Project stargazers_count, untangle",
      "display": "544",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Python XML libraries lxml xmltodict defusedxml Beautiful Soup parse namespaces streaming XML code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
