none
xmltextwriter in C# RRS feed

  • Question

  • hello,i write code in c# for write and read from/to xml file but this error appear (the type or namespace name 'xmltextwriter' could not be found)
    Sunday, June 3, 2018 9:12 AM

Answers

  • Hi sami kh,

    Meanwhile, check whether you refer the namespace System.Xml.

    Dolen

    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by sami kh Wednesday, June 6, 2018 9:40 AM
    Monday, June 4, 2018 8:54 AM
  • There is a feature in Visual Studio that when hovering over a variable when you get this or similar message Visual Studio will show a light bulb with suggestions as shown below and in this case shows the proper solution to use System.Xml so click on it to add the using statement.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Marked as answer by sami kh Wednesday, June 6, 2018 9:42 AM
    Monday, June 4, 2018 10:07 AM
    Moderator

All replies

  • I guess you are using XmlWriter.Create(file, xmlSetting)

    Did you define XmlWriterSettings ?


    Ayman Elsrouji

    Sunday, June 3, 2018 9:37 AM
  • Yes xmltextwriter is not in .Net; use XmlTextWriter.


    Sam Hobbs
    SimpleSamples.Info

    Sunday, June 3, 2018 5:40 PM
  • Hi sami kh,

    Meanwhile, check whether you refer the namespace System.Xml.

    Dolen

    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by sami kh Wednesday, June 6, 2018 9:40 AM
    Monday, June 4, 2018 8:54 AM
  • There is a feature in Visual Studio that when hovering over a variable when you get this or similar message Visual Studio will show a light bulb with suggestions as shown below and in this case shows the proper solution to use System.Xml so click on it to add the using statement.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Marked as answer by sami kh Wednesday, June 6, 2018 9:42 AM
    Monday, June 4, 2018 10:07 AM
    Moderator
  • ?what the xmlwritersettings

    Wednesday, June 6, 2018 9:38 AM