Displaying XML Tags in Labels

I'm trying to parse an XML file containing "number of questions" using Objective C. I have to display these questions in shortcuts at runtime in the view. This means “n labels for“ n questions ”and“ n labels ”for“ n answers. ”Does anyone have any suggestions on how to do this?

0


a source to share


2 answers


You will probably need to use the NSXMLDocument class to parse the XML file. Take a look at the documentation either at developer.apple.com or in Xcode by choosing Documentation from the Help menu.

Search for NSXMLDocument. Read the link or click the link to read the Cocoa Tree-Based Programming Guide.



You can also find some sample code: http://www.mactech.com/articles/mactech/Vol.21/21.06/XMLParser/

Good luck.

+1


a source


If you are using one of the .NET languages ​​to achieve this, you may want to look into FlowLayoutPanel or TableLayoutPanel and dynamically create your labels and add them to the panel.



-1


a source







All Articles