GSXMLDocument $Revision$ $Date$ GSXMLDocument GSXML.h

XML Document.

documentWithVersion: version

Creation of a new XML document.

id d = [GSXMLDocument documentWithVersion: @"1.0"]; [d setRoot: [d makeNodeWithNamespace: nil name: @"plist" content: nil]]; [[d root] setProp: @"version" value: @"0.9"]; n1 = [[d root] makeChildWithNamespace: nil name: @"dict" content: nil]; [n1 makeComment: @" this is a comment "]; [n1 makePI: @"pi1" content: @"this is a process instruction"]; [n1 makeChildWithNamespace: nil name: @"key" content: @"Year Of Birth"]; [n1 makeChildWithNamespace: nil name: @"integer" content: @"65"]; [n1 makeChildWithnamespace: nil name: @"key" content: @"Pets Names"];
initWithVersion: version

Creation of a new XML document.

documentFrom: data

Creation of a new Document from libxml data.

initFrom: data

Creation of a new Document from libxml data.

version

Return the version of document.

encoding

Return the encoding of document.

save: filename

Save XML document.

lib

Return pointer to xmlDoc structure.

root

Return the root name of document.

setRoot: node

Set the root element of the document. Return the old root element.

makeNodeWithNamespace: ns name: name content: content

Creation of a new node element within a document.

GSXMLNode *n1, *n2; GSXMLDocument *d; d = [GSXMLDocument documentWithVersion: @"1.0"]; [d setRoot: [d makeNodeWithNamespace: nil name: @"plist" content: nil]]; [[d root] setProp: @"version" value: @"0.9"]; n1 = [[d root] makeChildWithNamespace: nil name: @"dict" content: nil];