Export XML problem

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!!
 
J

Joe Fallon

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top