On Dec 13, 2007, at 4:39 PM, Major Domo wrote:
Speaking in terms of Objective C, what would be the best way to
convert an instance of DOMDocument into an instance of NSXMLDocument?
You'll need to serialize to an NSString, then parse it.
One way that might work, if you don't care about losing top level
processing instructions that are outside the HTML element is this.
[[document documentElement] outerHTML]
Then use initWithXMLString.
You could also write lots of Objective-C code to convert nodes one at
a time. That would be a lot of code but it would work for even more
cases.
-- Darin
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-dev