]> err.no Git - sope/blob - sope-xml/DOM/README
fixed an uninit var on Cocoa
[sope] / sope-xml / DOM / README
1 How to build a DOM tree ?
2 =========================
3
4 1. get a factory
5
6   DOMBuilderFactory *factory
7     = [DOMBuilderFactory standardDOMBuilderFactory];
8
9 2. get a builder for your resource type
10
11   id<DOMBuilder> builder
12     = [factory createDOMBuilderForMimeType:@"text/xml"];
13
14 3. parse what you have:
15
16   id<DOMDocument> document
17     = [builder buildFromSource:@"myfile.xml"];
18
19 Some info on classes ...
20 ========================
21
22 Nodes with children
23
24   Document
25   DocumentFragment
26   EntityReference
27   Element
28   Attr
29   Entity
30
31 Nodes without children
32
33   DocumentType
34   ProcessingInstruction
35   Comment
36   Text
37   CDATASection
38   Notation
39
40 Nodes with parent
41
42   DocumentType
43   EntityReference
44   Element
45   ProcessingInstruction
46   Comment
47   Text
48   CDATASection
49
50 Nodes without parent
51
52   Document
53   DocumentFragment
54   Attr
55   Entity
56   Notation