I asked this question a while back and the answer is using these data structures: DOMNode
, DOMNodeList
, and a method -childNodes:
.
The two data structures don't have documentation in the OS X documentation; the only interesting documentation I found was in the headers: DomText.h
, inside the Webkit framework.
The childNodes
gives some results, but I can't really tell if they are related to Webkit: NSTreeNode
.
The code comes from: http://cocoadev.com/wiki/DOMCore
It seems that these data structures map to the DOM specification, but I don't like to reuse code that I could not rewrite myself from the documentation. It feels like voodoo programming.
So where should I start ? Is there a documentation for traversing the DOM in Objective-C ?