title: How to extract and sum xml attribute values in oracle sql developer
body: <p>I have a lot of large xml messages stored as CLOBs in a column <strong>xml_message</strong> in table <strong>online_message</strong>. For example the messages looks something like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;CustomerDetails xmlns="http://something.com/version/1.0"&gt;
  &lt;CustomerId&gt;100345&lt;/CustomerId&gt;
  &lt;AccountDetails Account="account1" Value="103"/&gt;
  &lt;AccountDetails Account="account2" Value="142"/&gt;
  &lt;AccountDetails Account="account3" Value="345"/&gt;
  &lt;AccountDetails Account="account4" Value="634"/&gt;
  &lt;/CustomerDetails&gt;
  
  &lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;CustomerDetails xmlns="http://something.com/version/1.0"&gt;
  &lt;CustomerId&gt;100465&lt;/CustomerId&gt;
  &lt;AccountDetails Account="account5" Value="198"/&gt;
  &lt;AccountDetails Account="account6" Value="567"/&gt;
  &lt;AccountDetails Account="account7" Value="1984"/&gt;
  &lt;AccountDetails Account="account8" Value="84"/&gt;
  &lt;/CustomerDetails&gt;
  </code></pre>
  
  <p>I want to get all the <strong>Value</strong> attributes in all xml messages and sum them up. So the final result (in this example) should be 103+142+345+634+198+567+1984+84=4057. Any idea how i can do this in sql developer?</p>
  
  <p>Thanks!</p>