equalXML tests for equality of the normalized XML contents of a and b.
(a, b io.Reader)
| 881 | |
| 882 | // equalXML tests for equality of the normalized XML contents of a and b. |
| 883 | func (n *xmlNormalizer) equalXML(a, b io.Reader) (bool, error) { |
| 884 | var buf bytes.Buffer |
| 885 | if err := n.normalize(&buf, a); err != nil { |
| 886 | return false, err |
| 887 | } |
| 888 | normA := buf.String() |
| 889 | buf.Reset() |
| 890 | if err := n.normalize(&buf, b); err != nil { |
| 891 | return false, err |
| 892 | } |
| 893 | normB := buf.String() |
| 894 | return normA == normB, nil |
| 895 | } |
| 896 | |
| 897 | type byName []ixml.Attr |
| 898 |
no test coverage detected