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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:39:26+00:00 2026-05-16T08:39:26+00:00

How can I create xml file with this format using c#? <?xml version=1.0 encoding=utf-8

  • 0

How can I create xml file with this format using c#?

<?xml version="1.0" encoding="utf-8" ?>
<wrap>
  <content>
    <title>
      WHAT ARE ROLES?
    </title>
    <text>
        Roles are security based permissions that can be assigned to registered user of the site. Users can have any number of role based security permissions that the administrator deems appropriate. Certain parts of the application may have security permissions assigned to them to make the information they contain available only to those users with the required permisions.
    </text>
  </content>
  <content>
    <title>
      CREATE A ROLE
    </title>
    <text>
        To create a new role, simply enter its name into the textbox on top and click the "Add Role" button. Once it is created, it is then available to the administrator to be used and assigned to any registered user account.
    </text>
  </content>
  <content>
    <title>
      DELETE A ROLE
    </title>
    <text>
        To delete a role, select the checkboxes on the left side of the gridview and click the "Delete Selected" button.
    </text>
  </content>
</wrap>
  • 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-16T08:39:26+00:00Added an answer on May 16, 2026 at 8:39 am

    You may take a look at XDocument.

    XDocument doc = new XDocument(
        new XDeclaration("1.0", "utf-8", "yes"),
        new XElement("wrap",
            new XElement("content",
                new XElement("title", "WHAT ARE ROLES?"),
                new XElement("text", "Roles are security based permissions that can be assigned to registered user of the site. Users can have any number of role based security permissions that the administrator deems appropriate. Certain parts of the application may have security permissions assigned to them to make the information they contain available only to those users with the required permisions")
            ) // continue with other content tags
        ) 
    );
    doc.Save("test.xml");
    

    Another alternative is to use a XmlWriter or XmlDocument.

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

Sidebar

Related Questions

Can we create a Silverlight Socket Server ONLY using SILVERLIGHT and XML's (NO WCF
How can I create a PagerView dynamically? Without using a xml? Let's say that
I am using XmlReader.Create to retrieve data from an RSS xml file. Then I
I'm using Linq to XML to create a new XML file. Some part of
I have the following XML file containing letter and word definitions in this format
I am trying to create an XML file using string data. (Which is itself
<?xml version=1.0 encoding=utf-8?> <Report p1:schemaLocation=Customer details http://reportserver?%2fCustomer details&amp;rs%3aFormat=XML&amp;rc%3aSchema=True Name=Customer details xmlns:p1=http://www.w3.org/2001/XMLSchema-instance xmlns=Customer details> <table2>
Possible Duplicate: How can I produce a PDF file using data in an XML
Hai All i want to create an XML file with following format <myFiles> <name>myname</name>
I have created XML file,but I can't view it/output it.I know there is no

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.