UPDATEXML function supports multiple elements : UPDATEXML « XML « Oracle PL / SQL






UPDATEXML function supports multiple elements

  
SQL> CREATE TABLE myTable
  2  (id  NUMBER PRIMARY KEY
  3  ,doc XMLType NOT NULL)
  4  XMLTYPE doc STORE AS CLOB
  5  /

Table created.

SQL>
SQL>
SQL> 
SQL> update myTable
  2  set doc = updateXml( doc,
  3      'message/greeting/text()','test',
  4      'message/greeting/body/text()','test again'
  5  )
  6  where id = 1;

0 rows updated.

SQL> drop table myTable;

Table dropped.

   
    
  








Related examples in the same category

1.Update xmltype type column
2.Use UPDATEXML function to update a portion of the doc
3.Use the UPDATEXML function to change element value
4.Reference one element