Instance Propertysoto-core 7.4.0SotoXML
characterEncoding
XML.swift:156var characterEncoding: String?
var characterEncoding: String?
import SotoXML
final class Document
XML Document class
enum XML
Implemented to replace the XML Foundation classes. This was initially required as there is no implementation of the Foundation XMLNode classes in iOS. This is also here because the implementation of XMLNode in Linux Swift 4.2 was causing crashes. Whenever an XMLDocument was deleted all the underlying CoreFoundation objects were deleted. This meant if you still had a reference to a XMLElement from that document, while it was still valid the underlying CoreFoundation object had been deleted.
@frozen struct String
A Unicode string value that is a collection of characters.
init()
init(data: Data) throws
initialise with a block XML data
init(rootElement: XML.Element)
init(string: String) throws
initialise XML.Document from xml string
var version: String?
var xmlData: Data { get }
output formatted XML as Data
override var xmlString: String { get }
output formatted XML
func rootElement() -> XML.Element?
return the root element
func setRootElement(_ rootElement: XML.Element)
set the root element of the document