Xmlelement在Linux上没有可访问的初始化器 我正在尝试使用Linux上的Swift生成XML文档。但是以下代码没有编译: 令rootElement = xmlelement(名称:“ feed”) rootElement.setAttributeswith([“ XMLNS ...

问题描述 投票:0回答:0
我得到错误。我很惊讶,因为

'XMLElement' (aka 'AnyObject') cannot be constructed because it has no accessible initializers

是在Linux上有效的基础的一部分,对吗?我缺少什么吗?
	

修复是将以下保护导入添加到文件:

XMLElement
    

swift foundation
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.