Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 506861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:44:41+00:00 2026-05-13T06:44:41+00:00

Is the following XML declaration valid? <message metadata=SomeMetaData xsi:nil=true/> where xsi is defined as

  • 0

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>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:44:41+00:00Added an answer on May 13, 2026 at 6:44 am

    The XML is valid, provided that the “xsi” namespace is defined.

    What do you mean by “create the above data”? Example?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an xml tag that needs to be formatted like so: <AddDealRequest xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
I have the following XSD file: <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://www.wvf.com/schemas' xmlns='http://www.wvf.com/schemas' xmlns:acmewvf='http://www.wvf.com/schemas'> <xs:element name='loft'> </xs:element>
Following is my AOP xml declaration. <tx:annotation-driven proxy-target-class=true order=100 /> I am not using
I have the following declaration in my build.xml file, in my src folder I
I have the following xml declaration: public var reqData:XML = <root> <Requirement ID=REQ-GEN-0.1 title=exigence
Why doesn't the following code set the XML declaration encoding type? It always sets
I have the following manifest (snippet): <?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android android:versionCode=1 android:versionName=1.0 package=com.uniquename.appname>
Consider the following SQL: ;WITH XMLNAMESPACES(DEFAULT 'http://www.mynamespace.co.uk') ,CTE_DummyData AS ( select id=1 ) select
org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for
Given the following XML: <current> <login_name>jd</login_name> </current> <people> <person> <first>John</first> <last>Doe</last> <login_name>jd</login_name> </preson> <person>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.