title: Validating XML documents and working with numbers
body: <p>Suppose I have an XML document that lists all of the sales made for some items. Amongst a list of price values, there are also "total" elements that is the sum of some set of items. The XML document is generated from somewhere, and I would like to validate the XML to verify that </p>
  
  <ol>
  <li>The form is correct</li>
  <li>The content is correct. For example, the total of a set of child elements is equal to the sum of all of the values associated with each child.</li>
  </ol>
  
  <p>The XML documents are used as the standard medium between multiple programs, so it is important that the data is accurate. Currently there are checks done by the XML exporter, but I am wondering whether it is possible to validate the XML itself at the end to ensure that it is correct? And only if it is correct would it be valid?</p>