title: Make categories from string in XML data
body: <p>I looked everywhere but I don't see anything specific to the thing I am trying to achieve, especially with iOS/swift. I would like to make age categories from the XML parser request I am calling in my app.</p>
  
  <p>The age information will have to be called from the  tag in the xml data:</p>
  
  <pre><code>&lt;item&gt;
  &lt;description&gt;ANTHONY JOHNSON, Age: 17 From: PEORIA, IL&lt;/description&gt;&lt;/item&gt;
  </code></pre>
  
  <p>I already have a call to get the description tag in full:</p>
  
  <pre><code>func parser(_ parser: XMLParser, didEndElement elementName: String, 
   namespaceURI: String?, qualifiedName qName: String?) { 
  
   if elementName == "description" {
          self.person.desc = self.foundCharacters; }
  
       if elementName == "item" {
  tempData.desc = self.person.desc; }
  </code></pre>
  
  <p>Item class:</p>
  
  <pre><code> class Item { 
    var desc = "";
  }
  </code></pre>
  
  <p>I just need to make categories from the age value only. I plan on using them with an enum:</p>
  
  <pre><code>enum ageCategories: String {
  
      case ageUnder10 = "Age 10 and under"
      case age10Plus = "Age 10-15"
      case age15Plus = "Age 15+"
  }
  </code></pre>
  
  <p>My questions are:</p>
  
  <ul>
  <li>Do I make a call in the XML parser to get the ages? How would I organize the call to get the ages part of the description string only and put them in categories?</li>
  </ul>
  
  <p>OR </p>
  
  <ul>
  <li>Is there an easier way to call just the ages from the string I have already called in the XML parser and then make categories with that? i.e: replacingOccurrences(range searchRange:"Age")</li>
  </ul>