Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2008 > C# 2008 aka C# 3.0
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 16th, 2009, 09:43 PM
Authorized User
 
Join Date: Feb 2007
Location: Delhi, Delhi, India.
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default error CS0234: The type or namespace name 'Xml' does not exist in the namespace 'Syste

Hi
I'm in the phase of learning C#. I'm trying to save/retrieve the data in XML file entered on command line by the user. I'm getting the following error during compilation.

error CS0234: The type or namespace name 'Xml' does not exist in the namespace 'System' (are you missing an assembly reference?)

I would appreciate, If you could help me resolve this issue.

Thanks....
  #2 (permalink)  
Old July 16th, 2009, 10:55 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Do you have a reference to System.Xml in the project?
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
  #3 (permalink)  
Old July 17th, 2009, 01:29 PM
Authorized User
 
Join Date: Feb 2007
Location: Delhi, Delhi, India.
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

yes, I do have a reference to System.Xml in the project.
In fact, I've added the following references for XML parsing of data

using System.Xml;
using System.Xml.Serialization;

Thanks for your response Lee !
  #4 (permalink)  
Old July 17th, 2009, 01:32 PM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,133
Thanks: 1
Thanked 189 Times in 188 Posts
Default

That is not the same as adding a project reference.

Is System.Xml listed under the project references.

If not, right click on the project, choose Add Reference, and add a reference to System.Xml.dll.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
The Following User Says Thank You to samjudson For This Useful Post:
  #5 (permalink)  
Old July 17th, 2009, 02:25 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Sam is correct. A using statement is not the same as having an assembly reference in the project.

The error message tells you exactly what to do:

are you missing an assembly reference?

That means you need to reference the assembly.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
  #6 (permalink)  
Old July 17th, 2009, 03:13 PM
Authorized User
 
Join Date: Feb 2007
Location: Delhi, Delhi, India.
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks a lot Sam, Lee ! That helped.

Appreciate It..
  #7 (permalink)  
Old August 19th, 2009, 08:56 PM
Authorized User
 
Join Date: Feb 2007
Location: Delhi, Delhi, India.
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default Overwrite the User Input in XML file

Hi
I'm learning to code in C#. I'm writing the code which gets the UserInput from Command line and saves it in the XML file. I'm using XML serialization and Deserialization to get the User input(for e.g. BankAccountNumber,Type,Balance) in XML file. My code overwrites the last user input and doesn't add/increment the last user input as next entry. I guess, I'm missing some enhancement in my code to save/increment each user input in XML file. I would appreciate, If someone could help me to resolve this issue.

Thanks for Your Help !

Regards
  #8 (permalink)  
Old August 19th, 2009, 09:28 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,190
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi.. Seeing some code will help us help you.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
  #9 (permalink)  
Old August 20th, 2009, 04:11 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,133
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Not posting on the end of an unrelated question would also help.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to convert an existing namespace and add new namespace to the SOAP xml Prabeen XSLT 10 April 28th, 2009 11:18 AM
Transforming XML From One Namespace to Another mail4kaja XSLT 1 November 10th, 2008 10:14 AM
xml namespace and asp werD420 XML 1 August 12th, 2005 02:12 PM
Could not load type 'Namespace.PageName'. Bhavin Crystal Reports 0 December 16th, 2004 03:58 PM



All times are GMT -4. The time now is 11:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.