A step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.
A C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.
This tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.
Creating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.
Newbie: Creating New Tags - No CRLF After Tag |
On Tuesday, August 18th 2009 at 05:35 PM By vbDavidC |
|
|
I am wanting to know when you code with MSXML and you create new tags do you get CRLFs after each tag. I am very new to XML files. Someone sent me an XML file to populate. I am using MSXML v3.0 (although I could go up to 6.0). Anyway the XML file is very straightforward and I have been able to read certain values then write values for existing tags. One requirement is that I may need to create new tags/nodes. In the XML file I have the following entries: <no_of_attachments> <no_of_iterations>1</tpc:no_of_iterations> <file_name>-</tpc:file_name> <no_of_attachments> If <no_of_iteration> >1 then I need to create an additional <file_name> tag. I got it to work with the following code: Set newNode = xmlDoc.createNode(1, "newChild", "") currNode.appendChild newNode newNode.Text = "abc.txt" However, if I look at my code using Notepad++ after the new tag there is not a CRLF before the next tag <no_of_attachments>. However, if I look at it with IE7 it looks fine. All the other tags have a CRLF at the end of the line and I would want to be consistent. I found someone on some forum who basically asked a similar question and it seemed like most responses were that this was normal. There was no way to specify a 'CRLF' as an option. |
||