I am doing a application which have a sharing note option to Ever-Note,i have done this,but my problem is ,the content of the note has to be static that means
NSString * ENML = [[[NSString alloc] initWithString: @"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">\n<en-note>"]autorelease];
this is the code i used to share a note to evernote,if i add note in
`NSString * ENML = [[[NSString alloc] initWithString: @"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">\n<en-note> this is my note this is my note"]autorelease];`
it will share it to evernote
But my need is i have a textview which the user can create note dynamically with textview and i need something like that to do my need,
NSString * ENML = [[[NSString alloc] initWithString: @"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">\n<en-note>textview.text"]autorelease];
but its not working.How can i do this?.please help me.
regards nipin
First of all, if your string is constant, you can just declare it as @”mystring”;
In order to add a string inside another string, use stringWithFormat:
The %@ in the string will be replaced with the value of textview.text. See “Formatting String Objects” in Apple’s Developer Documentation for more info.