I haven't do this but you could check the entire document with a regular expression and remove any instance of it. I think it is \r but I am not positive.
Travis D. Falls | Consultant RAFT.Net IT | 860.547.4070 | [EMAIL PROTECTED] -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of tennilleclayton Sent: Monday, November 28, 2005 10:03 AM To: [email protected] Subject: [AspNetAnyQuestionIsOk] Removing Carriage Return I am creating a XML document with asp.net c#. is there a way to remove the Carriage Returns from the XML document? Below is a sample code: XmlDocument xmldoc = new XmlDocument(); XmlDeclaration xmlDeclaration = xmldoc.CreateXmlDeclaration("1.0","utf-8",null); //Create a new guest element and add it to the root node XmlElement rootNode = xmldoc.CreateElement("EmployeeTW"); xmldoc.InsertBefore(xmlDeclaration, xmldoc.DocumentElement); xmldoc.AppendChild(rootNode); XmlElement parentNode = xmldoc.CreateElement("EmployeeMaintenance"); xmldoc.DocumentElement.PrependChild(parentNode); // Create the required nodes XmlElement SessionInfoNode = xmldoc.CreateElement("SessionInfo"); SessionInfoNode.SetAttribute("RegionName", ""); SessionInfoNode.SetAttribute("BranchId", ""); SessionInfoNode.SetAttribute("UserId", "SYS"); SessionInfoNode.SetAttribute("UserPassword", ""); parentNode.AppendChild(SessionInfoNode); XmlElement RecordIDNode = xmldoc.CreateElement("RecordID"); RecordIDNode.SetAttribute("EmployeeNumber", ""); RecordIDNode.SetAttribute("ActionType", "Add"); parentNode.AppendChild(RecordIDNode); XmlElement CommandNode = xmldoc.CreateElement("Command"); CommandNode.SetAttribute("Name", "_EMITSI"); parentNode.AppendChild(CommandNode); Yahoo! Groups Links ************************************************************************* This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. ************************************************************************* ------------------------ Yahoo! Groups Sponsor --------------------~--> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
