New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recursive XML elements #38
Comments
@aaomidi thanks for using XMLMapper. You can use the optional strategy with a model class like this: class Item: XMLMappable {
var nodeName: String!
var id: Int?
var item: Item?
required init?(map: XMLMap) {}
func mapping(map: XMLMap) {
id <- map["id"]
item <- map["item"]
}
} |
Thank you! |
I don't think this is working :( Some code to demonstrate:
Prints:
This is the first level nodes in the XML file. |
I can see it hitting: Then failing that and hitting: Also failing that and hitting: |
Please ignore me, I am an idiot and this was supposed to be mapped to an array, rather than an object. |
Hi!
How would I go about handling recursive XML elements?
E.g.
The text was updated successfully, but these errors were encountered: