DOM

A DOM implementation for Objective-C. Note that the provided tree class is all but efficient, maybe someone likes to provide a better one ? ;-)

Nodes

Protocols

Classes

How to build a DOM tree ?

1. get a factory

  DOMBuilderFactory *factory
    = [DOMBuilderFactory standardDOMBuilderFactory];

2. get a builder for your resource type

  id builder
    = [factory createDOMBuilderForMimeType:@"text/xml"];

3. parse what you have:

  id document
    = [builder buildFromSource:@"myfile.xml"];
    

Some info on classes ...

Nodes with children

  Document
  DocumentFragment
  EntityReference
  Element
  Attr
  Entity

Nodes without children

  DocumentType
  ProcessingInstruction
  Comment
  Text
  CDATASection
  Notation

Nodes with parent

  DocumentType
  EntityReference
  Element
  ProcessingInstruction
  Comment
  Text
  CDATASection

Nodes without parent

  Document
  DocumentFragment
  Attr
  Entity
  Notation