gpt4 book ai didi

iphone - 如何在 iphone 中将数据传递给 Tbxml

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:44:36 24 4
gpt4 key购买 nike

我正在尝试使用 TBXML,我想通过发送用户名和密码来解析 xml,但不知道该怎么做,我已经学习了很多教程。

  -(IBAction)login{
NSString *str2=emailtxt.text;
NSString *str3=passtxt.text;

TBXML * tbxml = [TBXML tbxmlWithURL:[NSURL URLWithString:@"http://www.vinipost.com/my_service.asmx/signIn"]];


TBXMLElement *rootXMLElement = tbxml.rootXMLElement;

if (rootXMLElement)
{
TBXMLElement * user = [TBXML childElementNamed:@"Table1" parentElement:rootXMLElement];

while (user != nil)
{

TBXMLElement *CountryId = [TBXML childElementNamed:@"usrid" parentElement:user];
if (CountryId != nil)
{
NSLog(@"CountryId :: %@", [TBXML textForElement:CountryId]);
}

TBXMLElement *CountryName = [TBXML childElementNamed:@"ContctNmbr" parentElement:user];
if (CountryName != nil)
{
NSLog(@"CountryName :: %@", [TBXML textForElement:CountryName]);
}

user = [TBXML nextSiblingNamed:@"Table1" searchFromElement:user];
}
}
}

最佳答案

将您的网址更改为

[NSURL URLWithString:@"http://www.vinipost.com/my_service.asmx/signIn?email=yourEmail&pass=yourPass"];

您可以通过此链接 Operation On String 在运行时设置您的电子邮件和密码

关于iphone - 如何在 iphone 中将数据传递给 Tbxml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15240191/

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