View Single Post
  #1 (permalink)  
Old April 27th, 2006, 03:03 PM
boondocksaint20 boondocksaint20 is offline
Authorized User
 
Join Date: Apr 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Converting XML to XML (making element mandatory)

Hi,

I have an XML that I am pulling from a webservice. The webservice schema specifies that certain fields have a minoccurs of zero, so obviously the document does not list elements in sequence that have nulls.

This is a problem because my vb.net application that I wrote will immediate call another function that will read the XML and write it to a Sql Server database, and the function crashes bc the document does not contain elements with nulls (because if element #2 has a null in one record, it doesn't write it to the xml so my program thinks element #3 is element #2).

Can you use XSLT to specify either to always write an element no matter what or to write it and put 'null' as a value if it is 'null' is the byte stream from the Web Service?

Thanks in advance.

Reply With Quote