\r and \n are return and newline, respectively.

On 11/28/05, Falls, Travis D (HTSC, CASD) <[EMAIL PROTECTED]>
wrote:
>
> 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
>
>
> 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);
>
>


[Non-text portions of this message have been removed]



------------------------ 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/
 


Reply via email to