source: trunk/TestCase/SimpleTestCase/XmlTest.ab@ 451

Last change on this file since 451 was 444, checked in by dai, 17 years ago

タグ属性用のテストコードを追加。

File size: 596 bytes
Line 
1Namespace XmlTest
2
3
4Sub TestMain()
5 Dim doc = New System.Xml.XmlDocument()
6 doc.AppendChild( doc.CreateXmlDeclaration( "1.0", "UTF-8", Nothing ) )
7 doc.AppendChild( doc.CreateElement( "root" ) )
8 doc.ChildNodes[1].AppendChild( doc.CreateElement( "test" ) )
9
10 Dim attr1 = doc.CreateAttribute( "attr1" )
11 attr1.Value = "123"
12 doc.ChildNodes[1].Attributes.Add( attr1 )
13 Dim attr2 = doc.CreateAttribute( "attr2" )
14 attr2.Value = "456"
15 doc.ChildNodes[1].Attributes.Add( attr2 )
16
17 System.Diagnostics.Debug.WriteLine( doc.OuterXml() )
18End Sub
19
20
21End Namespace
22
23XmlTest.TestMain()
Note: See TracBrowser for help on using the repository browser.