B
babylon
I have an XML tag that may contain optional child element:
i.e.
<mytag myattribute="abc">
<othertag>
...
</othertag>
</mytag>
or just
<mytag myattribute="abc"></mytag>
however, if i do
WriteStartElement("mytag");
WriteAttributeString("myattribute", "abc");
WriteEndElement(); // mytag
it would become:
<mytag myattribute="abc" />
...
can i specify it to become
<mytag myattribute="abc"></mytag>
??
as when i do
ReadStartElement("mytag")
XXXX
ReadEndElement(); // This will fail if it encounter <mytag myattribute="abc"
/ >
but remember that <mytag> may contain sub elements...
...
please help!
i.e.
<mytag myattribute="abc">
<othertag>
...
</othertag>
</mytag>
or just
<mytag myattribute="abc"></mytag>
however, if i do
WriteStartElement("mytag");
WriteAttributeString("myattribute", "abc");
WriteEndElement(); // mytag
it would become:
<mytag myattribute="abc" />
...
can i specify it to become
<mytag myattribute="abc"></mytag>
??
as when i do
ReadStartElement("mytag")
XXXX
ReadEndElement(); // This will fail if it encounter <mytag myattribute="abc"
/ >
but remember that <mytag> may contain sub elements...
...
please help!