Search code examples
iphoneobjective-cxmlipadtbxml

TBXML and <?xml> tag problem


this is my problem:

I am using TBXML in my iPad app. The XML server responses start with the xml description line:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

and TBXML is not able to parse the nodes (i.e nextSibling methods are getting null). Converting the XML to a string to remove the line is not an option as I am using a NSData object directly with the tbxmlWithXMLData() method to create my TBXML objects.

What can I do to make TBXML understand my XML? Of if not, is there any way to remove that line from the NSData?

Thanks all.


Solution

    • It looks like I was adding some blank spaces before load the XML in the TBXLM objects. I removed the spaces and all is working fine now. Thank you all.