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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:15:39+00:00 2026-05-30T19:15:39+00:00

Can anyone tell me what i’m doing wrong here.I am trying to generate a

  • 0

Can anyone tell me what i’m doing wrong here.I am trying to generate a system info in xml.My XML schema is like this

<root>
   <system>
        <applications>
        </applications>
   </system>
</root>

Snooping around the internet i found this code.But it is hard to implement it
problems faced:
“b” is a string which i get from regedit.exe’s version number

writer.WriteElementString("Execute Bit Length", "64");

Also doesn’t work

writer.WriteStartElement(".Net Framework 4", NET_FRAMEWORK.ToString());

gives me the error cannot write hexadecimal value 0x20
NET_FRAMEWORK is a boolean value.
Basically i screwed up with the XML

using (XmlWriter writer = XmlWriter.Create("sys_info.xml"))
                {


                    writer.WriteStartDocument();
                    writer.WriteStartElement("System");



                    writer.WriteStartElement("OS");

                    writer.WriteElementString("Ver", Environment.OSVersion.ToString());
                    writer.WriteElementString("Execute Bit Length", "64");
                    writer.WriteElementString("Registry version", b.ToString());


                    writer.WriteEndElement();

                    writer.WriteStartElement("APPCHECK");
                    writer.WriteStartElement(".Net Framework 4", NET_FRAMEWORK.ToString());
                    writer.WriteStartElement("PDF reader", PDF_READ.ToString());
                    writer.WriteStartElement("internet Explorer Version", IE.ToString());
                    writer.WriteEndElement();
                    writer.WriteEndDocument();
  • 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-30T19:15:40+00:00Added an answer on May 30, 2026 at 7:15 pm

    Note that spaces are not allowed in XML node names, so you need to change or remove them.

    Also I would recommend you to try Linq to XML:

    var xDocument = new XDocument(
        new XElement("root", 
            new XElement("System", 
                new XElement("OS",
                    new XElement("Ver", Environment.OSVersion.ToString()), 
                    new XElement("Execute_Bit_Length", "64"),
                    new XElement("Registry_version", b) 
    
                    ),
                new XElement("APPCHECK",
                    new XElement("NET_Framework_4", NET_FRAMEWORK),
                    new XElement("PDF_Reader", PDF_READ),
                    new XElement("Internet_Explorer_Version", IE)
                )
            )));
    
    xDocument.Save("sys_info.xml");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me why this isn't working for me? Example page here http://totalcommunitycollegemove.com/post-438.html
Can anyone tell me how I can display a status message like 12 seconds
Can anyone tell me what exactly does this Java code do? SecureRandom random =
Can anyone tell me how to open Auto CAD file in HTML5? Is this
Can anyone tell me why this code would throw an undefined is not a
Can anyone tell me why this won't execute? set serveroutput on ; Declare TYPE
Can anyone tell me why this works: $(#test1 td).click(function(event) { $(#test1).addClass(tableRowSelected); }); $(#test2 td).click(function(event)
Can anyone tell me why does this timer run only once? import java.awt.*; import
Can anyone tell me why this code crashes with SIGABRT unrecognised selector sent to
can anyone tell me why this animation isn't starting? i've tried putting code in

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.