Parses the schema XML. Args: schema_path: Path to the schema XML file. Returns: An `ElementSpec` for the root element in the schema.
(schema_path)
| 71 | |
| 72 | |
| 73 | def parse_schema(schema_path): |
| 74 | """Parses the schema XML. |
| 75 | |
| 76 | Args: |
| 77 | schema_path: Path to the schema XML file. |
| 78 | |
| 79 | Returns: |
| 80 | An `ElementSpec` for the root element in the schema. |
| 81 | """ |
| 82 | with resources.GetResourceAsFile(schema_path) as file_handle: |
| 83 | schema_xml = etree.parse(file_handle).getroot() |
| 84 | return _parse_element(schema_xml) |
| 85 | |
| 86 | |
| 87 | def _parse_element(element_xml): |
no test coverage detected
searching dependent graphs…