(raw_body: str)
| 18 | |
| 19 | |
| 20 | def parse_declaration(raw_body: str) -> Optional[str]: |
| 21 | body = raw_body.strip() |
| 22 | # XMLDecl ::= '<?xml' DECL_CONTENT '?>' |
| 23 | if body.startswith(XML_DECLARATION_OPEN): |
| 24 | end = body.find(XML_DECLARATION_CLOSE) |
| 25 | if end != -1: |
| 26 | return body[:end + len(XML_DECLARATION_CLOSE)] |
| 27 | |
| 28 | |
| 29 | def pretty_xml(document: 'Document', |
no outgoing calls
no test coverage detected