EDN Admin
Well-known member
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
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