True if the element in `line_2` is XML-equivalent to the element in `line`. In particular, the order of attributes in XML is not significant.
(self, line: str, line_2: str)
| 88 | return sorted(attr_lst) |
| 89 | |
| 90 | def _eq_elm_strs(self, line: str, line_2: str) -> bool: |
| 91 | """True if the element in `line_2` is XML-equivalent to the element in `line`. |
| 92 | |
| 93 | In particular, the order of attributes in XML is not significant. |
| 94 | """ |
| 95 | front, attrs, close, text = self._parse_line(line) |
| 96 | front_2, attrs_2, close_2, text_2 = self._parse_line(line_2) |
| 97 | if front != front_2: |
| 98 | return False |
| 99 | if self._attr_seq(attrs) != self._attr_seq(attrs_2): |
| 100 | return False |
| 101 | if close != close_2: |
| 102 | return False |
| 103 | if text != text_2: |
| 104 | return False |
| 105 | return True |
| 106 | |
| 107 | def _parse_line(self, line: str): |
| 108 | """Return front, attrs, close, text 4-tuple result of parsing XML element string `line`.""" |
no test coverage detected