Is the following XML declaration valid?
<message metadata="SomeMetaData" xsi:nil="true"/>
where xsi
is defined as "http://www.w3.org/2001/XMLSchema-instance
"
If I am trying to create the above data for transfer through a ASP.NET Web Service Application in C#, how do I go about coding the above?
Say for example I have a web service method written in C# called
SomeMethod(Msg someMessage)
How to I indicate that the message
field found in class Msg
contains an attribute called metadata
and that the field message
itself is also an element which can be null
(contains no data as shown in following example)?
<message metadata="SomeMetaData"></message>
In other cases, it can contain some data as follows:
<message metadata="SomeMetaData">
<data>1234</data>
<data>5678</data>
</message>