Skip to content

Commit 865b1ba

Browse files
authored
Try to fix output display
1 parent 0613573 commit 865b1ba

File tree

1 file changed

+17
-15
lines changed
  • snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateElement Example/VB

1 file changed

+17
-15
lines changed

snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateElement Example/VB/source.vb

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
1-
' <Snippet1>
21
Option Explicit
32
Option Strict
43

54
Imports System.IO
65
Imports System.Xml
76

87
Public Class Sample
9-
108
Public Shared Sub Main()
11-
'Create the XmlDocument.
9+
' <Snippet1>
10+
11+
' Create the XmlDocument.
1212
Dim doc As New XmlDocument()
1313
doc.LoadXml("<book genre='novel' ISBN='1-861001-57-5'>" & _
1414
"<title>Pride And Prejudice</title>" & _
1515
"</book>")
1616

17-
'Create a new node and add it to the document.
18-
'The text node is the content of the price element.
17+
' Create a new node and add it to the document.
18+
' The text node is the content of the price element.
1919
Dim elem As XmlElement = doc.CreateElement("price")
2020
Dim text As XmlText = doc.CreateTextNode("19.95")
2121
doc.DocumentElement.AppendChild(elem)
2222
doc.DocumentElement.LastChild.AppendChild(text)
2323

2424
Console.WriteLine("Display the modified XML...")
2525
doc.Save(Console.Out)
26-
End Sub
26+
27+
' The example displays the following output:
28+
'
29+
' Display the modified XML...
30+
' <?xml version="1.0" encoding="utf-8"?>
31+
' <book genre="novel" ISBN="1-861001-57-5">
32+
' <title>Pride And Prejudice</title>
33+
' <price>19.95</price>
34+
' </book>
35+
'
36+
' </Snippet1>
37+
End Sub
2738
End Class
28-
' The example displays the following output:
29-
'
30-
' Display the modified XML...
31-
' <?xml version="1.0" encoding="utf-8"?>
32-
' <book genre="novel" ISBN="1-861001-57-5">
33-
' <title>Pride And Prejudice</title>
34-
' <price>19.95</price>
35-
' </book>
36-
' </Snippet1>

0 commit comments

Comments
 (0)