1 Reply Latest reply: May 27, 2014 3:26 AM by chris227 RSS

    different uuid and different unique number in the xml file being generated by my procedure ...please help me XML/PLSQL GURUS !!!!!

    nkandwal

      I need a different uuid and different unique number in the xml file being generated by my procedure

      OUTPUT:

      <entry>

      <id>urn:uuid:6C5FC78F-92E6-7D76-BAE0-78395D6CF2E3</id>

      <link rel="self" href="https://localhost:8080/DataCustodian/espi/1_1/resource/RetailCustomer/9B6C7066/UsagePoint/5446AF3F/MeterReading/01/IntervalBlock/742409381"/>

      <link rel="up" href="https://localhost:8080/DataCustodian/espi/1_1/resource/RetailCustomer/9B6C7066/UsagePoint/5446AF3F/MeterReading/01/IntervalBlock"/>

      <title/>

      <content>

      <IntervalBlock xmlns="http://naesb.org/espi">

      <interval>

      <duration>86400</duration>

      <start>1388563200</start>

      </interval>

      <IntervalReading>

      <cost>72000</cost>

      <timePeriod>

      <duration>900</duration>

      <start>1388563200</start>

       

      CODE i am using:

      XMLELEMENT("entry"

                         , XMLELEMENT("id",'urn:uuid:'||new_uuid)

                         , XMLELEMENT("link"                

                         , XMLATTRIBUTES( 'self' AS "rel" ,'https://localhost:8080/DataCustodian/espi/1_1/resource/RetailCustomer/9B6C7066/UsagePoint/5446AF3F/MeterReading/01/IntervalBlock/'||abs(dbms_random.random)  AS "href"))

                         , xmlelement("link"                

                         , XMLATTRIBUTES( 'up' AS "rel" ,'https://localhost:8080/DataCustodian/espi/1_1/resource/RetailCustomer/9B6C7066/UsagePoint/5446AF3F/MeterReading/01/IntervalBlock' AS "href"))

                     , xmlelement("title")                

                     ,

                     xmlelement("content",

                       xmlelement("IntervalBlock"

       

      multiple interval blocks are generated I need different id for the each of them. However they are all having the same uuid 6C5FC78F-92E6-7D76-BAE0-78395D6CF2E3 and number 742409381 can i make them different for each new block ...please advice ???