My favorites | Sign in
Project Home
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 24: Writing XML
3 people starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Feb 2009


 
Reported by avoc...@gmail.com, Aug 5, 2008
Great stuff. As a developer who needs to write XML files as well (to sync back from native iPhone 
app to Rails web app), here's a vote for that! Would love to avoid hacking together my own.
Aug 7, 2008
Project Member #1 jwight
List of APIs that need to be added for write support:

@interface CXMLNode ( Creation ) 

- (void)addAttribute:(CXMLNode *)attribute; //primitive 
+ (id)attributeWithName:(NSString *)name stringValue:(NSString   
*)stringValue; 
+ (id)elementWithName:(NSString *)name stringValue:(NSString *)string; 
- (void)setStringValue:(NSString *)string; 
- (void)detach; //primitive 

@end 



@interface CXMLElement ( Creation ) 

+ (id)attributeWithName:(NSString *)name stringValue:(NSString   
*)stringValue; 

- (id)initWithName:(NSString *)name; 

- (void)addChild:(CXMLNode *)child; 
- (void)addAttribute:(CXMLNode *)attribute; //primitive 

+ (id)elementWithName:(NSString *)name; 

- (void)setChildren:(NSArray *)children; //primitive 

- (NSArray *)elementsForLocalName:(NSString *)localName URI:(NSString   
*)URI; 

- (NSXMLNode *)namespaceForPrefix:(NSString *)name; 

@end 

Aug 7, 2008
Project Member #2 jwight
Moving this to high priority. I know a lot of people want this.

Any volunteers?

If we do add this in it - it should be implemented in such a way that it can be disabled easily - either via a 
#define or via inclusion/exclusion of category files.
Labels: -Priority-Medium Priority-High TouchXML
Nov 17, 2008
#3 sean_ro...@yahoo.com
The KissXML project supports all of this:
https://code.google.com/p/kissxml/

Why not just keep TouchXML read-only, and let KissXML handle write support?
Nov 17, 2008
Project Member #4 jwight
Because I need write support and don't want to use two APIs.

It would have been nice if the KissML author had contributed to TouchXML instead of forking his own project. Oh 
well.

Preliminary write support (that can be left OUT of your project) is now in TouchXML as of around r228. More 
support is being added.
Nov 18, 2008
#5 sean_ro...@yahoo.com
I've spoken with the developer of KissXML.  He said he forked a different project for two reasons:
1) The TouchXML wiki claimed XML writing/output support was in the long term/never category.
2) In order to properly add it, he needed to completely rethink the API.

Just like with CocoaHTTPServer, it seems like this project is doing the same thing as KissXML.  Do you think it 
would be possible to work together?
Feb 28, 2009
Project Member #6 jwight
Partial support in place.
Status: Done

Powered by Google Project Hosting