???? ???? ?? ??? ??? XSL ??????????????? ???? XML ???????? ??? ?? ?? XML ???????? ?? ??? Visual Basic .NET ?? ????? ?? ???? ????

???? ?????? ???? ??????
???? ID: 300929 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

??????

?? ???? illustrates ?? ??????????? ??????? ???? (XML) ???????? ????? ???? ?? ??? ??? ??????????? Stylesheet ???? (XSL) ?????????????? (XSLT) ?? ???? ???? ?? ??? ???? ????XslTransform??? ??? XML ???????? ????? ?? ??? ????? XSL ??? ??? XML-?????? ???? ?? ?? XML ???????? ?? ???? ???? XML ???????? ?? ???? ???? ?????? ???????? ??? ??? XML ???????? ??? transform ???? ?? ??? ??????? ???? ??? ???

??????????

????? ???? outlines ???????? ?????????, ??????????, ??????? ??????, ?? ???? ???? ???:
  • Microsoft Visual Studio .NET
  • Microsoft .NET ?????????? ????????? ??? (SDK) Quickstarts
?? ???? ????? ?? ?? ?? ????? ???? ?? ?????? ???:
  • XML ??????
  • ??? ??? ?? ?? ???? XML ???? ?? ????
  • XML ?? ???? (XPath) ????????
  • XSL

????? ????? ?? ??? ???

?? ?????? Books.xml ?? Books.xsl ???? ?? ??????? ?? ????? ???? ??? ?? ???? Books.xml ?? Books.xsl ??????? ?? ????? ?? .NET ?????????? ????????? ??? (SDK) QuickStarts ?? ??? ????? ??? ?? ????? ??????? ?? ????? ?? ???? ???? You must copy the Books.xml and Books.xsl files to the \Bin folder that is located underneath the folder in which you create this project. In Visual Studio .NET 2003, these files can be found in the following folder:
..\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\QuickStart\Howto\Samples\Xml\Transformxml\Vb
In Visual Studio .NET 2002, these files can be found in the following folder:
..\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Samples\QuickStart\Howto\Samples\Xml\Transformxml\Vb
  1. Create a new Console Application in Visual Basic .NET.
  2. ????????? ???? ?? ????????? ?? ??? ??? ?????? ???System.Xml??? ?????, ?? ??? ?? ???? ??, ?? ?????? ??? ???????
  3. ?????Imports?? ???????? ???XML, ??Xsl???????? ???? ?? ???? ??? ??? ??? ??? ?? ???????? ??? declarations ????? ????? ?? ??? ?????? ???? ???? ?? ????? ????Importsstatement prior to any other declarations:
    Imports System.Xml
    Imports System.Xml.Xsl
    					
  4. ??????? ?? ????? ????? ????? ??XslTransformobject to transform XML documents:
    Dim myXslTransform As XslTransform
    					
  5. Construct a newXslTransform???????? ??? TheXslTransform???? ?? XSLT ???????? ?? XSLT ??????? 1.0 ??????? ???? ???? ??:
    myXslTransform = New XslTransform()
  6. ???????? ??????? ???? ?? ??? ????XslTransform???????? ???? ????? ?? ??? ?? ???? ????? ?? ???????? ?????? ????????????? ???? ???????? ???? (ISBN) ???? ??? Books.xsl ????? ?? ????? ?????????????
    myXslTransform.Load("books.xsl")
    					
  7. ??????????????????????? ?? ??????? ???? ?? ??? ???? XML ????? ??? ??? ?? ??? ?? ???????? ?? transformed XML ???????? ?? ???:
    myXslTransform.Transform("books.xml", "ISBNBookList.xml")
    					
  8. ?????, ?? ???? ????????? ?? ?????? ??????? ISBNBookList.xml ????? ?? ?? ???? ????????? ????? ??????? ?? ??????? \Bin ?????? ??? ???? ???? ????

????? ??? ?????

Imports System.Xml
Imports System.Xml.Xsl
Module Module1

    Sub Main()
        Dim myXslTransform As XslTransform
        myXslTransform = New XslTransform()
        myXslTransform.Load("books.xsl")
        myXslTransform.Transform("books.xml", "ISBNBookList.xml")
    End Sub

End Module
				

??????

?? ???? ??? ???? ??????? ?? ???XslTransform????, ????? Microsoft .NET Framework ????? ????????? ????? ????????:
(VS.71) http://MSDN.Microsoft.com/en-us/library/SYSTEM.XML.XSL.xsltransform .aspx
?? ???? ??? ???? ??????? ?? ???XslTransform?? ??? ????XslTransform???????? ??, ????? Microsoft .NET Framework ?????? ?? ????? ???????? ????????????:
HTTP://MSDN.Microsoft.com/en-us/library/aa735781.aspx
?? ????????? ?? ????? XSLT ?? asp.NET, ?? ??? ????? ??????????? MSDN Voices ???? XML?????:
HTTP://MSDN.Microsoft.com/en-us/library/ms950754.aspx
.NET ??? XML ?? ???? ??? ???? ??????? ?? ??? ????? ".NET ??? XML: .NET Framework XML ???? ?? C# ???????? ??????, ???????? ???? Manipulation" ?? ????MSDN Magazine????? Microsoft ??? ???? ??:
HTTP://MSDN.Microsoft.com/msdnmag/issues/01/01/XML/default.aspx
???? ??????? ?? ???, ????? ???????? ?????:
R. Allen Wyke, Sultan Rehman, Brad Leupen.XML (??? ??????) ????????????. Microsoft ?????, 2001
???? ??????? ?? ???, ????? Microsoft ????????? ?? ??????? ????????? ?? ??? ??????:
Microsoft CorporationXML ?? Microsoft .NET ??????????? 2500 ?????

???

???? ID: 300929 - ????? ???????: 04 ?????? 2010 - ??????: 2.0
???? ???? ???? ??:
  • Microsoft Visual Basic .NET 2003 Standard Edition
  • Microsoft Visual Basic .NET 2002 Standard Edition
??????: 
kbhowtomaster kbmt KB300929 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:300929

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com