Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <Category id="IND">
  2. <Name>father</Name>
  3. <Category id="IND_TURN_ORD">
  4. <Name>child1</Name>
  5. <Category id="IND_TURN_ORD">
  6. <Name> child of the child </Name>
  7. </Category>
  8. </Category>
  9. </Category>
  10.  
  11. func parser(parser: NSXMLParser!, didStartElement elementName: String!, namespaceURI: String!, qualifiedName qName: String!, attributes attributeDict: [NSObject : AnyObject]!) {
  12. if (elementName == "Category") && (!categoryIsOpen){
  13. println(“found child“)
  14. currentChildOpen++
  15. categoryIsOpen = true
  16.  
  17. Category.listCategory[countCategory].append(Category())
  18. // Call recursive func
  19.  
  20.  
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement