title: validating an xml and finding line and column of error
body: <p>i have an xml document of this kind </p>
  
  <pre><code>   &lt;xml&gt;
      &lt;person name="a"&gt;
        &lt;age&gt;21&lt;/age&gt;
        &lt;salary&gt;50000&gt;&lt;/salary&gt;
      &lt;/person&gt;
      &lt;person name="b"&gt;
        &lt;age&gt;25&lt;/age&gt;
        &lt;salary&gt;30000&gt;&lt;/salary&gt;
      &lt;/person&gt;
      &lt;person name="c"&gt;
        &lt;age&gt;30&lt;/age&gt;
        &lt;salary&gt;60000&gt;&lt;/salary&gt;
      &lt;/person&gt;
      &lt;person name="d"&gt;
        &lt;age&gt;35&lt;/age&gt;
        &lt;salary&gt;150000&gt;&lt;/salary&gt;
      &lt;/person&gt;
     &lt;/xml&gt;
  </code></pre>
  
  <p>Now im trying to validate this document by passing this to a method like this </p>
  
  <pre><code>  validate(string file)
    {
      // here i have some logic 
      // say i am trying to check if the salary is &gt;50000  and age &gt; 30
      // if it doesn't satisfy the condition i have to return an error
  
    }
  </code></pre>
  
  <p>I am able to achieve this . What i really want is to know where exactly the error in xml document is , like which line and column.</p>
  
  <p>How should i do this ? any suggestions?</p>