title: Get value of node using xmlpath.v2 golang
body: <p>I am parsing a xml document using <a href="http://gopkg.in/xmlpath.v2" rel="nofollow noreferrer">gopkg.in/xmlpath.v2</a>, and I am finding a trouble... I have no problem to get info from a single node, or get a iterator and loop over its items getting their info. But, the case where I am blocked is when I try to get the info from the same node on which I am iterating. I think that an example will be illuminating.<br>
  This is the XML:</p>
  
  <pre><code>&lt;Warnings&gt;
      &lt;Warning Type="309" ShortText="Unfulfilled Paid Service 1"&gt;Unable to book seat 1&lt;/Warning&gt;
      &lt;Warning Type="309" ShortText="Unfulfilled Paid Service 2"&gt;Unable to book seat 2&lt;/Warning&gt;
      &lt;Warning Type="309" ShortText="Unfulfilled Paid Service 3"&gt;Unable to book seat 3&lt;/Warning&gt;
  &lt;/Warnings&gt;
  </code></pre>
  
  <p>These are the xpath that I am usin:</p>
  
  <pre><code>xpath := xPathWarning{
      WarningsBase:       "Warnings/Warning",
      Warning:            "",
      WarningAttr:        "@ShortText",
  }
  </code></pre>
  
  <p>And this is the way that I am trying to get the value and attribute:</p>
  
  <pre><code>func getWarnings(root *xmlpath.Node, xpath xpath_OC) []Warning {
      warnings := []Warning{}
      v, _ := xmlpath.Compile(xpath.WarningsBase)
      WarningsBaseIter := v.Iter(root)
      for WarningsBaseIter.Next() {
          rawOffer := WarningsBaseIter.Node()
          warning := Warning{
              Value: GetString("", xpath.Warning, rawOffer),
              Attr:  GetString("", xpath.WarningAttr, rawOffer),
          }
          warnings = append(warnings, warning)
      }
      return warnings
  }
  func GetString(ExpressionPrefix string, XPathExpression string, Node *xmlpath.Node) string {
      Expr := []string{ExpressionPrefix, XPathExpression}
      pathString := strings.Join(Expr, "")
      if pathString != "BLANK" {
          Path, err := xmlpath.Compile(pathString)
          if err == nil {
              Value, _ := Path.String(Node)
              return Value
          }
      }
      return ""
  }
  </code></pre>
  
  <p>I am able to get the ShortText, but not the value. I had been checking the error, showing on terminal the result of <code>Path, err := xmlpath.Compile(pathString)</code>, and the err shown is <code>compiling xml path "":0: empty path</code>.  </p>
  
  <p>Any solution for this??<br>
  Thanks.</p>