1 How to build a DOM tree ?
2 =========================
6 DOMBuilderFactory *factory
7 = [DOMBuilderFactory standardDOMBuilderFactory];
9 2. get a builder for your resource type
11 id<DOMBuilder> builder
12 = [factory createDOMBuilderForMimeType:@"text/xml"];
14 3. parse what you have:
16 id<DOMDocument> document
17 = [builder buildFromSource:@"myfile.xml"];
23 You can navigate the DOM tree with standard key/value coding. The NGDOMDocument
24 will treat all KVC keys starting with a "/" as query path expressions.
27 document.documentElement => root DOMElement
28 document.documentElement.childNodes => NSArray containing the root children
29 document./uid => DOMElement or array! matching 'uid'
30 document./uid.textValue => text-value of 'uid' element
32 element.@value.textValue => text-value of 'value' attribute of element
33 element./subnode.textValue => lookup subnode (strips of the /) using QP
36 Some info on classes ...
37 ========================
48 Nodes without children