-
-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix self-closing XML element is not equivalent to an element without content #1174
Fix self-closing XML element is not equivalent to an element without content #1174
Conversation
Thanks for taking a stab at this. |
I think, the conditions are required (logically). |
I tried to do some manual mutation testing to get a better gut feeling about the logic. The 6 cases marked with "no test" are the ones that didn't fail.
By adding a test with both
|
@jnyrup you don't have Netflix over there? 😂 |
@jnyrup, I added two tests and removed a statement which is not really required. There are left-overs due to So, I kindly ask to take the current version. The wrapper may (!!!) not need the code when used only in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, great job 👍
While testing equivalence of XML documents using the XDocument/XElement extension of FA, I found that "empty elements" are identified as different to "self-closing elements", but e.g.
<child></child>
should be equivalent to<child />
, e.g. according to https://www.w3schools.com/xml/xml_elements.aspMy proposed solution does not look great. But I did not have any other idea to "move forward" and "rewind" the
XmlReader
.What do you think?