Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 在XML中更改版本_Iphone_Ios_Xcode4_Gdataxml - Fatal编程技术网

Iphone 在XML中更改版本

Iphone 在XML中更改版本,iphone,ios,xcode4,gdataxml,Iphone,Ios,Xcode4,Gdataxml,当我按照本教程使用XML生成XML时 并将其保存到“文档”文件夹中。 从documents文件夹打开该文件后,它的xml版本为=“1.0”。 我想将xml版本更改为2.0。请给出任何修改版本的建议 在教程中,您有这个,对吗 GDataXMLDocument *document = [[[GDataXMLDocument alloc] initWithRootElement:partyElement] autorelease]; 要将xml文档的版本从“1.0”更改为“2.0”

当我按照本教程使用XML生成XML时 并将其保存到“文档”文件夹中。 从documents文件夹打开该文件后,它的xml版本为=“1.0”。
我想将xml版本更改为2.0。请给出任何修改版本的建议

在教程中,您有这个,对吗

GDataXMLDocument *document = [[[GDataXMLDocument alloc] 
        initWithRootElement:partyElement] autorelease];
要将xml文档的版本从“1.0”更改为“2.0”,可以执行以下操作:

NSString *versionString = @"2.0";
const unsigned char *cVersionString = (const unsigned char*)[versionString cStringUsingEncoding:NSUTF8StringEncoding];
document.rootElement.XMLNode->doc->version = cVersionString;

在教程中,你有这个,对吗

GDataXMLDocument *document = [[[GDataXMLDocument alloc] 
        initWithRootElement:partyElement] autorelease];
要将xml文档的版本从“1.0”更改为“2.0”,可以执行以下操作:

NSString *versionString = @"2.0";
const unsigned char *cVersionString = (const unsigned char*)[versionString cStringUsingEncoding:NSUTF8StringEncoding];
document.rootElement.XMLNode->doc->version = cVersionString;