Skip to content
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

[SR-10717] [XMLNode] var kind: XMLNode.Kind { get } returns an incorrect value on Linux. #3342

Closed
YOCKOW opened this issue May 20, 2019 · 2 comments
Assignees

Comments

@YOCKOW
Copy link
Collaborator

YOCKOW commented May 20, 2019

Previous ID SR-10717
Radar None
Original Reporter @YOCKOW
Type Bug
Status Resolved
Resolution Done
Environment

Swift 5.0.1
Ubuntu 18.04, macOS Mojave 10.14.4

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee @YOCKOW
Priority Medium

md5: 5a7df55b4b5229c9d713698772db27a3

duplicates:

  • SR-9069 XMLDocument(xmlString:) produces nodes with kind .invalid instead of .text on Linux

Issue Description:

Please see the code below:

import Foundation

print((XMLNode.processingInstruction(withName: "name", stringValue: "value") as? XMLNode)?.kind == .processingInstruction)
// -> Prints "true" on macOS.
// -> Prints "false" on Linux.

print((XMLNode.comment(withStringValue: "comment") as? XMLNode)?.kind == .comment)
// -> Prints "true" on macOS.
// -> Prints "false" on Linux.

print((XMLNode.text(withStringValue: "text") as? XMLNode)?.kind == .text)
// -> Prints "true" on macOS.
// -> Prints "false" on Linux.

print(XMLDTDNode(xmlString: #"<!NOTATION f SYSTEM "F">"#)?.kind == .notationDeclaration)
// -> Prints "true" on macOS.
// -> Prints "false" on Linux.
@YOCKOW
Copy link
Collaborator Author

YOCKOW commented May 20, 2019

Opened PR#2287.

@YOCKOW
Copy link
Collaborator Author

YOCKOW commented Jun 7, 2019

It has been merged into master: 0a04b94

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant