How to dump XML in KissXML - dump

I used KissXML in my project, now I wanna dump XML info for trace like Zend_Debug::dump(XXX) in php.
But I failed to find API support in KissXML.
Any Idea? or I have to implement by myself?
Thanks!

You can use the description message, or event better, [xml XMLStringWithOptions:DDXMLNodePrettyPrint]

Related

How to create XML String in iPhone to use in web-service requests?

I want to create XML string to be sent to server through web-service. How do I do it natively in iPhone? Or do I have to use any third party library?
I was not able to download GDATA for iPhone. Any else available? Or any other way to do it?
Please help,
Thanks in advance.
You can create XML file with StringWithFormat method or Some of XML parser allow write XML as well. Please refer link of Parser for writing XML
http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project
You can use JSON parser also....
You may want to refer to SBJSON Framework which is frequently used for objective-C, I have used this framework in may of my iOS Apps.
You may get a reference about it from these links:
https://github.com/stig/json-framework
http://stig.github.com/json-framework/
Example Code: Also here is an example on, How to parse JSON with SBJSON Parser:
How to parse JSON into Objective C - SBJSON
http://jasarien.com/?p=428

how to create XML Doc in ios

in my current project i need to create one xml file and send it to server.
i searched many sites a got information about some API like
NSXML (now its deprecated)
http://onlinefreecomputertutorials.blogspot.in/2011/07/how-to-read-and-write-xml-documents.html
GDATAXML (now its deprecated)
http://www.raywenderlich.com/725/how-to-read-and-write-xml-documents-with-gdataxml
please if is there any API i can use to create xml or you have any idea just share with me or any link for tutorial to create xml in objective c.
thanks for any help.
Use TCMXMLWriter. It's a small XML library with a very nice syntax.

How can I parse and update local XML in iOS?

I am trying to do following task. I know we can read XML in iOS using a parser, but can we locally update the same XML?
1) Read XML from local resource folder.
2) Update XML. Locally change value of a tag.
Thanks for your help.
If you just need to read the XML you can use the native NSXMLParser. If you need to change the XML you can use TouchXML. You can get a good tutorial on how to use TouchXML here. Also interesting discussion of the various options here.

Tutorial or sample code for parsing xml file using libxml2 in IPhone Application

I just want a tutorial demonstrating the parsing of XML File using libXml2 in Iphone . I found tutorials on TouchXMLand other but not the same for Libxml2
Please help if u can.
Apple has an example iPhone project that parses some simple XML using both NSXMLParser and libxml2 SAX2. You can find the project here:
http://developer.apple.com/iphone/library/samplecode/XMLPerformance/Introduction/Intro.html
Although this isn't exactly a tutorial, it is working code. It runs in the simulator out of the box. Because it accomplishes the same task twice, you should be able to compare the libxml2 code to the NSXMLParser code to figure out what's going on.
Not even these?
I recommend TBXML. I use it everytime I need to parse a XML File. It's really easy to use. ;-)
See here: TBXML Homepage
A good sample is:
http://bill.dudney.net/roller/objc/entry/libxml2_push_parsing

parse string with tags

I am receiving a chunk of data from PBX in string with tags included.
Something like this:
</response><rid>2</rid><name>2101<name><PeerList></PeerList><status>UNKNOWN</status>
cont...till it fetches all the names/users from the PBX.
what i need to do is to parse this string data to retrieve name & status and update in to the table where i can add the user into iPhone's phonebook.
I've started with NSScanner but eventually i messed up with that.
if anyone has any idea please help me out!!!!
You have received an XML file, use an XML parser first.
What language/OS/environment are you using?
NSScanner seems to be Mac specific.
Check out NSXMLParser or a third-party framework such as TouchXML.