开发者

How to create XML editor for iPhone?

I want to create a XML editor (form view type) for iphone. Can anyone suggest me how to proceed in this regard. I know how to parse an XML document but I am having 开发者_C百科trouble in editing the contents of the file dynamically. This editor should be such that, a new node can be added or a node can be deleted, it can also edit the values.

Please help...


In short you need to parse the document into a readable structure, finding a way to modify that structure, and write it back to XML.

Classes you are likely to need to write include MyXMLDocument, MyXMLNode, MyXMLElement and MyXMLTextNode, and MyXMLNode likely needs NSArray *children;, MyXMLNode *parent; and MyXMLDocument *document; as ivars.

You also probably need something akin to a -stringValue method; and an understanding of how the XML DOM usually works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜