Skip to content

[SR-2301] NSXMLParser not fully implemented #4342

Open
@swift-ci

Description

@swift-ci
Previous ID SR-2301
Radar rdar://problem/76905860
Original Reporter TimKreger (JIRA User)
Type Bug

Attachment: Download

Environment

Ubuntu 14.04
swift-3.0-PREVIEW-2

Additional Detail from JIRA
Votes 5
Component/s Foundation
Labels Bug, Linux
Assignee KingOfBrian (JIRA)
Priority Medium

md5: 803674b2c85303d495af09f40e0e6338

Issue Description:

I'm attempting to implement an xml parser using (swift-3.0-PREVIEW-2) on Ubuntu. When compiling it requires all of the NSXMLParserDelegate functions to be implemented (they are optional on OSX) which I have implemented. However at run time none of the the delegate functions are called even though .parse() completes with no error. Ie this function never gets called during the parsing.

 public func parserDidStartDocument(_ parser: Foundation.NSXMLParser) { print("Did start") } 

so I have been using swift-3.0-PREVIEW-2 on ubuntu.

I have included an example parser.
Note that the important delegate functions

public func parserDidStartDocument(_ parser: XMLParser)
public func parserDidEndDocument(_ parser: XMLParser)
public func parser(_ parser: XMLParser, didStartElement elementName: String, namespaceURI: String?, qualifiedName qName: String?, attributes attributeDict: [String : String])
public func parser(_ parser: XMLParser, didEndElement elementName: String, namespaceURI: String?, qualifiedName qName: String?)

are never called.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions