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>
The XML is valid, provided that the "xsi" namespace is defined.
What do you mean by "create the above data"? Example?
加载中,请稍侯......
精彩评论