title: Duplicate check within xml element
body: <p>I need to do duplicate check with in xml element attribute value.</p>
  
  <p>Sample Input Request:</p>
  
  <pre><code> &lt;Parent&gt;
     &lt;child id="1"&gt; test 1&lt;/child&gt;
     &lt;child id="1"&gt; test 2&lt;/child&gt;
     &lt;child id="2"&gt; test 3&lt;/child&gt;
  &lt;/parent&gt;
  </code></pre>
  
  <p>I want to find duplicate id which is present in child element attribute in the request xml using XSD or some other way would be fine.Anyone please help me to detect duplicate element attribute value.</p>