-2

well i've tried to do some code that can do a xml file in a "well done" way, I found this code https://gist.github.com/brentdax/caaaa134c500e00efd36 and i think is a good option to implement that i wish. but i can implementa that.

actually i implements but the error says: use of undeclared type NSXMLNode.

I tried to put it on source file, in a playgrouns on viewcontroller code file without success

I don`t know how can implement this.+

thanks in advice

jhuazano
  • 31
  • 4

1 Answers1

1

If you want help fixing your code you need to show us that code.

Failing that, take a look at the NSXMLParser class. It's fairly easy to use.

EDIT:

This is a very old thread, but rmaddy pointed out that the question was about generating XML, and my solution of using NSXMLParser will parse XML, but not generate it.

I recently found a reference to the XMLParsing library, which apparently follows the conventions of the Codable protocol. I suggest using that.

Duncan C
  • 128,072
  • 22
  • 173
  • 272
  • NSXMLParser is for parsing XML, not generating XML. – rmaddy May 22 '15 at 15:55
  • @rmaddy, You were able to tell that the OP wants to generate XML, not read it? Good on you then. I didn't get that far in understanding the question. – Duncan C May 22 '15 at 16:10
  • The question's title made it clear to me. :) And the linked file is for generating XML. – rmaddy May 22 '15 at 16:12
  • @rmaddy, Oh yeah, the title does make that pretty clear, doesn't it? :\ (Walking away, head bowed in shame...) – Duncan C May 22 '15 at 19:41