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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:58:18+00:00 2026-06-05T12:58:18+00:00

public XML() { this.InitializeComponent(); XmlDocument document_name = new XmlDocument(); XmlElement student = document_name.CreateElement(Student); XmlElement

  • 0
public XML()
{
    this.InitializeComponent();

    XmlDocument document_name = new XmlDocument();       
    XmlElement student = document_name.CreateElement("Student");
    XmlElement name = document_name.CreateElement("Chandru");
    student.AppendChild(name);
    document_name.AppendChild(student);
    XmlAttribute id = document_name.CreateAttribute("ID");
    name.SetAttributeNode(id);
    id.Value = "sst5038";
    XmlElement fname = document_name.CreateElement("FName");
    fname.InnerText = "Anjappn";
    name.AppendChild(fname);
    XmlElement mname = document_name.CreateElement("MName");
    mname.InnerText = "Thaiyamuthu";
    name.AppendChild(mname);
    document_name.AppendChild(student);
    document_name.Save(@"D:\student.xml");
}

with above code.I create one xml file as code behind in wpf and i save this file in my local disk D:\student.xml

 document_name.Save(@"D:\student.xml");

But i want to save this xml file (student.xml) in my project file which i am working now.

what should i do for this.

please help me…

  • 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-06-05T12:58:20+00:00Added an answer on June 5, 2026 at 12:58 pm

    Is this the property you’re looking for?

    System.AppDomain.CurrentDomain.BaseDirectory
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I call this function from with my code-behind: DeleteFile(Server.MapPath(/) + sitemap_index.xml) Public Shared Function
I imagine to use XML serialization like this: class Foo { public Foo (string
When using XML serialization in C#, I use code like this: public MyObject LoadData()
This is my xhtml code : <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC -//W3C//DTD
I'm using FluentNHibernate but NHibernate XML will do. Say I have this model public
[TestInitialize()] public void MyTestInitialize() { XmlTextWriter writer = new XmlTextWriter(DataFile.xml, Encoding.UTF8); writer.Formatting = Formatting.Indented;
I have a class this is annotated with @Path like so: @Path(widgets) @Produces(MediaType.APPLICATION_XML) public
I am parsing the public timeline xml from twitter and want to display images
I have following test class @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {/services-test-config.xml}) public class MySericeTest { @Autowired
I am building an XML document successfully with the following code: public function build($result)

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.