473,320 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

XML null node updation

Sir,
I have XML content in a xml type identifier as shown below.
Expand|Select|Wrap|Line Numbers
  1.  <VitalSummary>    
  2.      <VitalMngId/>
  3.     <FacilityTypeId>11</FacilityTypeId>
  4.     <VitalLatesetMngRev>1</VitalLatesetMngRev>
  5.     <VitalFrameId>0</VitalFrameId>
  6.     <MeasureDateTime>20060707163420</MeasureDateTime>
  7.     <CreatePractitioner>20060707163420</CreatePractitioner>
  8.     <CreateDateTime>20060707163420</CreateDateTime>
  9.     <DeleteFlag>0</DeleteFlag>
  10.     <ConnectionNumber>0</ConnectionNumber>
  11.     <PatientId>ANH1</PatientId>
  12.     <ToUpdateFlag>true</ToUpdateFlag>
  13.     <UpdatePractitioner>PRA1</UpdatePractitioner>
  14.     <UpdateDateTime>20060707163420</UpdateDateTime>
  15. </VitalSummary>
I want to know how I can set the value to the node <VitalMngId/> which is null.I can set value to other nodes using the code as shown below in a oracle Stored procedure.

Expand|Select|Wrap|Line Numbers
  1. PROCEDURE SET_VitalSummary(VitalSummary IN OUT  xmltype);
  2.  
  3. TnodelistVitFID     dbms_xmldom.DOMNodeList;
  4. TnodeVitFID       dbms_xmldom.DOMNode;
  5. TnodelistVitMngId    dbms_xmldom.DOMNodeList;
  6. TnodeVitMngId       dbms_xmldom.DOMNode;
  7.  
  8. Tdoc     := dbms_xmldom.newDOMDocument(VitalSummary);
  9.  
  10. TnodelistVitFID := xslprocessor.selectNodes(dbms_xmldom.makeNode(Tdoc),'/VitalSummary/FacilityTypeId');
  11. TnodeVitFID     := dbms_xmldom.item(TnodelistVitFID , 0);
  12. dbms_xmldom.setData(dbms_xmldom.getFirstChild(TnodeVitFID), '55');
I can change the value of <FacilityTypeId> from 11 to 55.

But I can't change the value of <VitalMngId> using the code as shown below because it is null
Expand|Select|Wrap|Line Numbers
  1. TnodelistVitMngId    := xslprocessor.selectNodes(dbms_xmldom.makeNode(Tdoc),'/VitalSummary/VitalMngId');
  2. TnodeVitMngId       := dbms_xmldom.item(TnodelistVitMngId, 0);
  3. dbms_xmldom.setData(dbms_xmldom.getFirstChild(TnodeVitFID), '10');
Can you inform me how i can set a value to xml node if it is null.

Regards,
Aneesh Kumar.P
Sep 11 '06 #1
0 1894

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Gaz | last post by:
I have a table which has 10 columns which make up the secondary key. 1 or more of these columns can be set but the remaining columns in the secondary key will be null. For example : id k1 k2...
3
by: sathyashrayan | last post by:
The standard confirms that the following initialization of a struct struct node { --- --- } struct node var = {NULL};
29
by: Jason Curl | last post by:
I've been reading this newsgroup for some time and now I am thoroughly confused over what NULL means. I've read a NULL pointer is zero (or zero typecast as a void pointer), others say it's...
0
by: Lakshmi Narayanan.R | last post by:
Hi Experts I am new to .NET. I need great explanation for "the updation in the disconnected data". How it is handled. That is, if mutiple user is interacting with the data, one will delete another...
1
by: Babz | last post by:
Hi, How I can prevent concurrent updation of a records in .net. I am using Dataset which is disconnected from the data source. In this situation if two users opens the same record, modifies the...
0
by: prashant | last post by:
Hi, I am trying to set up Transactional replication with immediate updation. The configuration is as follows: 1. Publisher is SQL server 2000 Enterprise Edition, and Distributor is on the...
0
by: aneeshkp | last post by:
Sir, I have XML content in a xml type identifier as shown below. </VitalSummary> <VitalMngId/> <FacilityTypeId>11</FacilityTypeId>...
14
by: drdeath89 | last post by:
Im writing some Javascript code that requires me to loop all child nodes and sub child nodes of a certain parent node and execute a function with the child node in question. I decided to write a...
1
by: siri11 | last post by:
Hi everyone!!!!!!!!! If i update a record in a table in sqlserver from front end (c#.net),using a stored procedure for updating then after updation if i open the table then it is showing the same...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.