User Name Password Register
DaniWeb IT Discussion Community
All
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 456,513 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 2,733 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: Programming Forums
Views: 9903 | Replies: 79
Reply
Join Date: Oct 2007
Posts: 23
Reputation: karsoods53 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
karsoods53 karsoods53 is offline Offline
Newbie Poster

Re: XML Management

  #51  
Nov 5th, 2007
When should I choose to validate on Server?
Reply With Quote  
Join Date: Oct 2007
Posts: 36
Reputation: mallar6 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
mallar6 mallar6 is offline Offline
Light Poster

Re: XML Management

  #52  
Nov 5th, 2007
DB2 9 supports validation on the server. You should validate incoming XML documents on the server if the incoming XML documents must be valid, but the XML documents are from an un-trusted source. For instance, suppose that a mortgage company has received an XML document of an application from a mortgage broker. All brokers develop their own applications to fill out the application forms, and to generate XML documents. Because the mortgage company has no control over these applications, and the applications might or might not follow the industrial standard XML schemas, the incoming XML documents are considered as being from an un-trusted source. The mortgage company must ensure that all XML documents are valid, and can validate all XML documents on the server side at insert and import time. The XMLVALIDATE function is used for validating XML documents with an insert statement in an application. The XMLVALIDATE function checks XML documents against the specified XML schema and makes sure that the XML document satisfies the constraints in the XML schema. When validating XML documents, the schema information passed to the XML validate function can be either explicitly passed (explicit validation) or implicitly inferred from the XML document (implicit validation). You can check http://www.ibm.com/developerworks/xm...y/x-style.html for defining data validation rules in XML schema.
Reply With Quote  
Join Date: Sep 2007
Posts: 13
Reputation: apuri976 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
apuri976 apuri976 is offline Offline
Newbie Poster

Re: XML Management

  #53  
Nov 5th, 2007
What is difference between explicit validation and implicit validation?
Reply With Quote  
Join Date: Oct 2007
Posts: 36
Reputation: mallar6 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
mallar6 mallar6 is offline Offline
Light Poster

Re: XML Management

  #54  
Nov 7th, 2007
The main difference between explicit validation and implicit validation is where the schema information (hints) are provided. For explicit validation, schema information is provided by the ACCORDING TO XMLSCHEMA clause embedded in the insert statement. For implicit validation, schema hints are provided by the inserting XML document.
Reply With Quote  
Join Date: Sep 2007
Posts: 19
Reputation: s.piyush58 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
s.piyush58 s.piyush58 is offline Offline
Newbie Poster

Re: XML Management

  #55  
Nov 7th, 2007
I want to add XML documents to the DB 2 database. How can I add it?
Reply With Quote  
Join Date: Oct 2007
Posts: 36
Reputation: mallar6 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
mallar6 mallar6 is offline Offline
Light Poster

Re: XML Management

  #56  
Nov 7th, 2007
You can use the insert or import to insert XML data files to DB2 relational tables with XML data type columns. First you have to make sure that you have already created a table with XML column. Then you can use import or insert command to put the data into the database.
Reply With Quote  
Join Date: Sep 2007
Posts: 19
Reputation: s.piyush58 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
s.piyush58 s.piyush58 is offline Offline
Newbie Poster

Re: XML Management

  #57  
Nov 7th, 2007
I tried to import an XML document to the database, but I am not able to do so. What can be the issue?
Reply With Quote  
Join Date: Oct 2007
Posts: 36
Reputation: mallar6 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
mallar6 mallar6 is offline Offline
Light Poster

Re: XML Management

  #58  
Nov 7th, 2007
You have to make sure that the XML document you are adding is a well formed XML document. You can only import well-formed XML documents because the columns defined as XML data types can only contain complete XML documents. If you are importing a data file with a row containing a document that is not well-formed, it will be rejected by DB2.
Reply With Quote  
Join Date: Sep 2007
Posts: 13
Reputation: apuri976 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
apuri976 apuri976 is offline Offline
Newbie Poster

Re: XML Management

  #59  
Nov 7th, 2007
How does pureXML parse XML documents?
Reply With Quote  
Join Date: Oct 2007
Posts: 36
Reputation: mallar6 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
mallar6 mallar6 is offline Offline
Light Poster

Re: XML Management

  #60  
Nov 7th, 2007
pureXML performs parsing in 2 ways, implicit parsing and explicit parsing.

Implicit XML parsing occurs when
a. you pass data to the database server using a host variable of type XML, or use a parameter marker of type XML
b. you assign a host variable, parameter marker, or SQL expression with a string data type (character, graphic or binary) to an XML column in an INSERT, UPDATE, DELETE, or MERGE statement.
Explicit parsing occurs when the XMLPARSE function is invoked when inputting XML data. The XMLPARSE function takes a non-XML, character or binary data type as input.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb RSS, Web Services and SOAP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the RSS, Web Services and SOAP Forum

All times are GMT -4. The time now is 3:53 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC