Geekpedia Tutorials Home

Building a C# Chat Client and Server

Building a C# Chat Client and ServerA 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.

in C# Programming Tutorials

Getting Hard Drive Information

Getting Hard Drive InformationA C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.

in C# Programming Tutorials

UPS Shipping Calculator

UPS Shipping CalculatorThis 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.

in PHP Programming Tutorials

Create Your Own Rich Text Editor

Create Your Own Rich Text EditorCreating 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.

in JavaScript Programming Tutorials
Search
Tutorials
Programming Tutorials
IT Jobs
From CareerBuilder

Newbie: Creating New Tags - No CRLF After Tag

On Tuesday, August 18th 2009 at 05:35 PM
By vbDavidC
Hello,

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.
Sponsors
Discover Geekpedia

Other Resources