Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optional Field/element in output
Message
From
28/07/2007 11:01:46
 
 
To
28/07/2007 10:16:32
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01244346
Message ID:
01244360
Views:
27
There's choice whether to output null values
create cursor test ;
	(	;
		a0		c(10), ;
		a1		 c(10) null , ;
		a2		 c(10) null ;
	)
	
	insert into test values( '1', '10', null)
	insert into test values( '2', null, '21')
	
	local xml, i, s, obj
	xml = createobject('xmladapter')
	
	=xml.AddTableSchema('test')
	xml.xmlSchemalocation=''

	
	xml.tables(1).Fields(3).Isnull = .f.
	= m.xml.ToXml('s')
	?s

	_cliptext = s
<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
<VFPDataSet>
	<test>
		<a0>1</a0>
		<a1>10</a1>
		<a2>.NULL.</a2>  && here Isnull = FALSE, hence output
	</test>
	<test>
		<a0>2</a0>       && a1 isnull = TRUE, hence no output
		<a2>21</a2>
	</test>
</VFPDataSet>
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform