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

  • Home
  • SEARCH
  • 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 6910363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:48:17+00:00 2026-05-27T08:48:17+00:00

For example, I got the class Header , and the class Dog . I

  • 0

For example, I got the class Header, and the class Dog.
I would like a file that looks like this:

enter image description here

So far, I have seen no examples to perform this. I must use the
serializer.Serialize because I got a collection of thousands of
objects. Doing otherwise would take too long.

If it is impossible, I will make two different files, one with the
header and the other with the collection of objects, but it is not an
interesting solution.

Edit:
I can’t use a wrapper since I don’t have my complete dog list at the
beginning. I receive one at the time until I stop the application

Thanks a lot!

  • 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-27T08:48:18+00:00Added an answer on May 27, 2026 at 8:48 am

    You will need to create another class the can represent this. For example.

    public class Kennel
    {
        public Header Header { get; set; }
        public List<Dog> Dogs { get; set; }
    }
    

    This can then be serialized/deserialized easily.

    In answer to your question. If you need the XML to be identical to yours, you will need to create a custom wrapper that will read and write the XML into that specific format.

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

Sidebar

Related Questions

I've got some XML, for example purposes it looks like this: <root> <field1>test</field1> <f2>t2</f2>
I've got some generic class for my JPA model POJO that goes like this:
I think this question is quite common. Recently I have got a requirement that
I have create following java file,compile it and got .class file. import java.io.*; import
I've got this header (redone from a boost asio example): #ifndef MSGSRV_H_ #define MSGSRV_H_
I've got a script using a captcha class like this <?php @session_start(); require str_replace('\\','/',dirname(__FILE__))
I've got a class that is essentially mutable, but allows for some persistent-like operations.
For example i got a class and its got its own properties and i
Suppose I've got the following program: namespace ReflectionTest { public class Example { private
I got the example in this link . I can't understand the addmove ,

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.