MSXML2.DOMDocument40 inserts extra whitespace inside the elements while loading

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello. Have a problem while using load method of MSXML2.DOMDocument40
It inserts extra tabs and new lines inside the elements.
Here is the code part in interest:
<div style="background-color:white; color:black
<pre><span style="font-size:x-small <font size="2 Dim xmlDoc </font> <span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small As<span style="font-size:x-small <span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small New<span style="font-size:x-small MSXML2.DOMDocument40 xmlDoc.async = <span style="color:blue False

xmlDoc.load(str_dir & str_sourceFileName)



re = <span style="color:blue New RegExp

re.Pattern = <span style="color:#a31515 "(<[^>/]+>([^<]+)?)n"

re.Multiline = <span style="color:blue True

<span style="color:blue If re.Test(xmlDoc.xml) <span style="color:blue Then

Console.WriteLine(<span style="color:#a31515 "Inserts extra newline!")

<span style="color:blue End <span style="color:blue If

[/code]

Thanx in advance!

View the full article
 
Back
Top