开发者

how to parse self closing tag in xml file

开发者 https://www.devze.com 2022-12-26 19:14 出处:网络
I am working on an iphone application in which I am consuming a webservice. So i am parsing the XML file data. any idea about how to parse self closing tag

I am working on an iphone application in which I am consuming a webservice. So i am parsing the XML file data. any idea about how to parse self closing tag like: State/ and how to read data of self tag like: Contact Email="abc@anc.com" Name="PhD" Phone="123-521-3388" Source="location"/

I am parsing xml file using NSXMLPARSER class methods and 开发者_如何学Clibrary

Thanks,


Your sample XML data

<Contact Email="abc@anc.com" Name="PhD" Phone="123-521-3388" Source="location"/>

is equivalent to

<Contact Email="abc@anc.com" Name="PhD" Phone="123-521-3388" Source="location"></Contact>

and should be parsed by any XML parser.

0

精彩评论

暂无评论...
验证码 换一张
取 消