 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ian Healy Guest
|
Posted: Wed Jan 11, 2006 4:28 pm Post subject: XML Data Binding and empty lists |
|
|
Using the XML data binding wizard in Delphi 6 Enterprise I created the
delphi wrapper classes from a file DTD. One of the elements in the DTD is a
list (FLAG_99*..<!ELEMENT FLAG_99 (#PCDATA)>), in most cases this list is
empty. When I save the generated XML to a file there is no
<FLAG_99>
node to indicate the empty list. The system on the receiving end needs this
node, how can I force delphi to generate it ?.
eg.
:
XMLData : String;
tmpX : IXMLMyType;
:
:
tmpX := NewMyType; // Function generated by wizard returning IXMLMyType
(derived from IXMLNode)
:
:
tmpX.something.add.property := 'xxx';
:
XMLData := tmpX.XML; // No <FLAG_99> node present if I've never done
tmpX.FLAG_99.Add('yyy');
Thanks for any ideas
Ian Healy.
|
|
| Back to top |
|
 |
Gigi Guest
|
Posted: Wed Jan 11, 2006 5:04 pm Post subject: Re: XML Data Binding and empty lists |
|
|
I think you can force Delphi to write it by reading it.
For example you can write tmpX.FLAG_99.Count ad you will have your empty
tag, or bettere add an empty alement and remove it, for example
tmpX.FLAG_99.Add('');
tmpX.FLAG_99.Delete(0); // or remove i don't remember
Bye
"Ian Healy" <I.healy (AT) grupposisge (DOT) it> ha scritto nel messaggio
news:43c53120 (AT) newsgroups (DOT) borland.com...
| Quote: | Using the XML data binding wizard in Delphi 6 Enterprise I created the
delphi wrapper classes from a file DTD. One of the elements in the DTD is
a list (FLAG_99*..<!ELEMENT FLAG_99 (#PCDATA)>), in most cases this list
is empty. When I save the generated XML to a file there is no
FLAG_99
node to indicate the empty list. The system on the receiving end needs
this node, how can I force delphi to generate it ?.
eg.
:
XMLData : String;
tmpX : IXMLMyType;
:
:
tmpX := NewMyType; // Function generated by wizard returning IXMLMyType
(derived from IXMLNode)
:
:
tmpX.something.add.property := 'xxx';
:
XMLData := tmpX.XML; // No <FLAG_99> node present if I've never done
tmpX.FLAG_99.Add('yyy');
Thanks for any ideas
Ian Healy.
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|