•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the RSS, Web Services and SOAP section within the Web Development category of DaniWeb, a massive community of 374,167 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,334 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our RSS, Web Services and SOAP advertiser:
Views: 3687 | Replies: 16
![]() |
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 1
Solved Threads: 0
This exception is typically found only on 32-bit JVMs. Native memory leak is the reason for java.lang.OutOfMemoryError exception while running XML update stored procedure. The java heap size should be updated to fix this problem.
The below command updates java heap size to 1024.
db2 update dbm cfg using JAVA_HEAP_SZ 1024
The below command updates java heap size to 1024.
db2 update dbm cfg using JAVA_HEAP_SZ 1024
•
•
Join Date: Oct 2007
Location: Sydney,Australia
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 1
Solved Threads: 0
Suppose that we have to add a new e-email address for clients. Below example shows how to add a new element in an XML document using the XMLUPDATE stored procedure.
CALL DB2XMLFUNCTIONS.XMLUPDATE(
'<updates>
<update action="append" col="1" path="/addr">
<Email>newEmail@yahoo.com</Email>
</update>
</updates>',
'select doc from CLIENTS where id=77',
'update CLIENTS set contactinfo=? where id=77', ?, ?);
i) action=”append” : we add new element
ii) col=”1” : we work with the first XML column returned by querySQL.
iii) path=”/addr” : the element we add will be a child to this element.
iv) <Email>newEmail@yahoo.com</Email> : the new element
v) ‘select doc from CLIENTS where id=77’ : Our querySQL
vi) ‘update CLIENTS ser cotactinfo=? Where id=77’ : Our updateSQL
CALL DB2XMLFUNCTIONS.XMLUPDATE(
'<updates>
<update action="append" col="1" path="/addr">
<Email>newEmail@yahoo.com</Email>
</update>
</updates>',
'select doc from CLIENTS where id=77',
'update CLIENTS set contactinfo=? where id=77', ?, ?);
i) action=”append” : we add new element
ii) col=”1” : we work with the first XML column returned by querySQL.
iii) path=”/addr” : the element we add will be a child to this element.
iv) <Email>newEmail@yahoo.com</Email> : the new element
v) ‘select doc from CLIENTS where id=77’ : Our querySQL
vi) ‘update CLIENTS ser cotactinfo=? Where id=77’ : Our updateSQL
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 1
Solved Threads: 0
First you need to create and register xml schema. Here, consider test.schema xml schema has been registered.
In the below example we are trying to update xml document stored in info column and validate the updated document against the test.schema2 xml schema.
In the below example we are trying to update xml document stored in info column and validate the updated document against the test.schema2 xml schema.
Call DB2XMLFUNCTIONS.XMLUPDATE ( '<updates namespaces="x:http://posample.org"> <update using="sql" action="replace" col="1" path="/x:customerinfo/x:addr/x:pcode-zip/text()"> select cid from Customer where cid=1004 </update> </updates>', 'Select info from Customer where cid=1004', 'update Customer set info=xmlvalidate( ? according to XMLSCHEMA ID test.schema) where cid=1004',?,?)
Last edited by peter_budo : Mar 17th, 2008 at 9:38 pm. Reason: Keep It Organized - please use [code] tags
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb RSS, Web Services and SOAP Marketplace
•
•
•
•
- Solution for Microsoft Update blank page and other things (Web Browsers)
- Searching and Comparing strings from an XML Document (Python)
- Starware removal (Viruses, Spyware and other Nasties)
- compare 2 xml files with csharp (C#)
- UPDATE question for ms sql 2000 (MS SQL)
- Dynamically Update Your Web Pages Via E-Mail (Search Engine Optimization)
- working with xml files without physically storing them. (ASP.NET)
- html vs. XML (JavaScript / DHTML / AJAX)
- windows update not work!! (Windows 9x / Me)
Other Threads in the RSS, Web Services and SOAP Forum
- Previous Thread: XML Management
- Next Thread: COntinous category List


Linear Mode