text(stringValue:)
create raw text node
static func text(stringValue: String) -> XML.Node
create raw text node
static func text(stringValue: String) -> XML.Node
import SotoXML
class Node
base class for all types of XML.Node
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.
static func attribute(withName: String, stringValue: String) -> XML.Node
create XML attribute node
static func comment(stringValue: String) -> XML.Node
create XML comment node
static func document() -> XML.Node
create XML document node
static func element(withName: String, stringValue: String? = nil) -> XML.Node
create XML element node
static func namespace(withName: String? = nil, stringValue: String) -> XML.Node
create XML namespace node
var childCount: Int { get }
return number of children
var children: [XML.Node]? { get }
var debugDescription: String { get }
CustomDebugStringConvertible protocol
var description: String { get }
CustomStringConvertible protocol
let kind: Kind
defines the type of xml node
var name: String?
weak var parent: XML.Node?
var stringValue: String?
var xmlString: String { get }
output formatted XML
func children(of kind: Kind) -> [XML.Node]?
return children of a specific kind
func detach()
detach XML node from its parent
enum Kind
XML node type