Export XML problem

  • Thread starter Thread starter Klaus
  • Start date Start date
K

Klaus

I'm using the 2003 new function ExportXML and i've the following
problem. If i export the data of a table, for all fields that have no
entry (null) the XML-Tag doesn't appear in the xml-File.

e.g
Table Person
_____________
Firstname = Klaus
Lastname = Smith
Title = <null>

The exported XML File looks like that:
<Person>
<Firstname>Klaus</Firstname>
<Lastname>Smith</Lastname>
</Person>

and I need:
<Person>
<Firstname>Klaus</Firstname>
<Lastname>Smith</Lastname>
<Title></Title>
</Person>

Is there a possiblity to do that. I need it that way for a following
XSLT transformation. I'm not allowed to change something in the
database!!
 
Untested.
Write a query based on that table.
In the query use the NZ function to convert Nulls to the value of your
choice (0 and "" are common ones)
Export the query to XML.
 
Back
Top