title: Buffer too small error while using XMLAgg/XMLElement
body: <p>I am executing the below query  in oracle and the following error comes up </p>
  
  <blockquote>
    <p>ORA-19011 : Character string buffer too small</p>
  </blockquote>
  
  <pre><code>select Rtrim(Xmlagg (Xmlelement (e, wonum  || ',')).extract ( '//text()' ), ',')
    as wolist
  from ( select w.wonum from workorder w  
    connect by prior w.wonum = w.parent and prior w.siteid = siteid 
    start with w.siteid =  'ABCD' and w.wonum = 'P1234' )
  </code></pre>
  
  <p>I have never used Xmlagg/Xmlelement hence I am not sure what's the issue. When the inner query is executed then the output would be like below</p>
  
  <pre><code>select w.wonum from workorder w
  connect by prior w.wonum = w.parent
  and prior w.siteid = siteid
  start with w.siteid = 'ABCD' and w.wonum = 'P1234'
  
  wonum   parent
  P1234
  5678    P1234
  9999    5678
  8888    9999
  </code></pre>
  
  <p>and so on... </p>