-
Notifications
You must be signed in to change notification settings - Fork 7.6k
BugReport: Fix incorrect XML closing tag syntax generated by XmlDocumentEx #42399
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
BugReport: Fix incorrect XML closing tag syntax generated by XmlDocumentEx #42399
Conversation
The `XmlDocumentEx::Print` method previously used `<\\` to close XML tags, which is invalid. This commit replaces `<\\` with `</` to ensure proper XML closing tag syntax. Changes include: - Replacing `<\\` with `</` in three instances where closing tags are generated. - Ensuring the XML output conforms to standard XML syntax. These changes improve the correctness of the XML output generated by the method.
|
One interesting point: the XML generated for event viewer entries isn't valid XML but rather a collection of XML fragments. It might not matter much to most people, but it's still worth noting when discussing this. |
…entEx (#42399) ## Summary of the Pull Request The `XmlDocumentEx::Print` method previously used `<\\` to close XML tags, which is invalid. This commit replaces `<\\` with `</` to ensure proper XML closing tag syntax. Changes include: - Replacing `<\\` with `</` in three instances where closing tags are generated. - Ensuring the XML output conforms to standard XML syntax. These changes improve the correctness of the XML output generated by the method. <img width="1014" height="499" alt="image" src="https://github.com/user-attachments/assets/a9ff6e47-6976-4290-a4f0-c23b0c773d61" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #42390 - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized - [x] **Dev docs:** Added/updated - [x] **New binaries:** Added on the required places - [x] **Documentation updated:** <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed
Hotfixes #42467 #42434 #42405 #42399 --------- Co-authored-by: Jiří Polášek <[email protected]> Co-authored-by: Niels Laute <[email protected]> Co-authored-by: Jaylyn Barbee <[email protected]> Co-authored-by: Gordon Lam <[email protected]> Co-authored-by: Dustin L. Howett <[email protected]>
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.
Pull Request Overview
This PR fixes a critical bug in XML output formatting where closing tags were incorrectly using backslashes (<\) instead of forward slashes (</), resulting in malformed XML.
- Fixed three instances of incorrect XML closing tag syntax from
<\tagname>to</tagname> - Corrected closing tags for nodes without children, nodes with single text children, and nodes with nested children
- Ensures the XML output conforms to proper XML syntax standards
…entEx (microsoft#42399) ## Summary of the Pull Request The `XmlDocumentEx::Print` method previously used `<\\` to close XML tags, which is invalid. This commit replaces `<\\` with `</` to ensure proper XML closing tag syntax. Changes include: - Replacing `<\\` with `</` in three instances where closing tags are generated. - Ensuring the XML output conforms to standard XML syntax. These changes improve the correctness of the XML output generated by the method. <img width="1014" height="499" alt="image" src="https://github.com/user-attachments/assets/a9ff6e47-6976-4290-a4f0-c23b0c773d61" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: microsoft#42390 - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized - [x] **Dev docs:** Added/updated - [x] **New binaries:** Added on the required places - [x] **Documentation updated:** <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed
Summary of the Pull Request
The
XmlDocumentEx::Printmethod previously used<\\to close XML tags, which is invalid. This commit replaces<\\with</to ensure proper XML closing tag syntax.Changes include:
<\\with</in three instances where closing tags are generated.These changes improve the correctness of the XML output generated by the method.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed