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 6902771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:50:24+00:00 2026-05-27T07:50:24+00:00

I am using the XmlSerializer, and was wondering if there is any way, using

  • 0

I am using the XmlSerializer, and was wondering if there is any way, using overrides or something to that effect to get the XmlSerializer to output the types of some nodes.

My problem is that I have serialized a byte array.

class MyClass {
  public string Name { get; set; }
  public byte[] Bytes { get; set; }
}

I am consuming the xml in a generic service.
The service collects the xml as .

<MyClass>
  <Name>Test</Name>
  <Bytes>U2NhcnkgQnVnZ2Vy</Bytes>
</MyClass>

Is there any way to either generate an xsd at runtime, or somehow output something like this.

I cannot change the class I am serializing, but I can apply overrides to the serializer or in some other way control the serialization.

<Bytes xsi:type='BinaryOfSomeKind'>BlahBlah</Bytes>

I need to know that the data is binary somehow.

Thanks

Craig.

  • 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-27T07:50:25+00:00Added an answer on May 27, 2026 at 7:50 am

    If your class is supplied by a third party then you know your properties and property types and you can deduce your XML and XSD from it. You can create your XSD manually or with the help of a XML tool for example XMLSpy (not free BTW) or XMLFox which is free of charge.

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

Sidebar

Related Questions

Is there a way to deserialize a XML stream using XmlSerializer by applying a
I am wondering is there a way to do batch updating? I am using
Possible Duplicate: XmlSerializer: remove unnecessary xsi and xsd namespaces I'm generating some XML using
I have a class that I serialize/deserialize using XmlSerializer . This class contains a
I'm using XmlSerializer to serialize an object that contains a generic list List <ChildBase>
I have an C# class that I would like to serialize using XMLSerializer. But
I'm using XMLSerializer to load some objects: using (FileStream fileStream = new FileStream(filename, FileMode.OpenOrCreate,
I'm having some issues using XmlSerializer and XmlTextReader in c# when saving DataTables which
I have an array of elements that I need to serialize using XmlSerializer. The
I have a method that serializes a collection to a file using the XmlSerializer.

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.