开发者

How to create XML editor for iPhone?

开发者 https://www.devze.com 2023-01-16 10:14 出处:网络
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 c

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

精彩评论

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