gpt4 book ai didi

iphone - TBXML "class method tbXMLWithURL not found"

转载 作者:行者123 更新时间:2023-11-28 18:40:58 26 4
gpt4 key购买 nike

我尝试使用 TBXML 并收到此错误

TBXML "class method +tbXMLWithURL not found"

我按照示例中的方式尝试

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{

TBXML * tbxml = [[TBXML tbxmlWithURL:[NSURL URLWithString:@"http://www.w3schools.com/XML/note.xml"]] retain];


}

最佳答案

您的代码和错误中有两个不同的东西:

TBXML "class method +tbXMLWithURL not found"

在您的代码中:

TBXML * tbxml = [[TBXML tbxmlWithURL:[NSURL URLWithString:@"http://www.w3schools.com/XML/note.xml"]] retain];

来自 TBXML api :

- (id)initWithURL:(NSURL*)aURL Instantiates a TBXML object then downloads and parses an XML file for the given URL. The following code instantiates a TBXML object and parses the note.xml file from w3schools.com.

我想你想要什么:

TBXML *tbxml = [[TBXML alloc] initWithURL:[NSURL URLWithString:@"http://www.w3schools.com/XML/note.xml"]];

关于iphone - TBXML "class method tbXMLWithURL not found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11010213/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com