????? ????? ????? XSL ?? ????? XML ???? ??? ??? ???????? .NET Visual C++ ?? Visual C++ 2005

?????? ????????? ?????? ?????????
???? ???????: 815653 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

?????? Microsoft Visual C# ?? ??? ??????? ? ???? 307322.

?????? ??? ????? Microsoft Visual Basic .NET ?? ??? ???????? ???? 300929.

???? ??? ??????? ??? ?????? ????? Microsoft .NET Framework ??? ????? ???????:
  • System.Xml
  • System.Xml.Xsl

?? ??? ??????

??????

???? ??? ??????? ???? ????? ??? ????? ????? ????? ??? ????? ??????? ??????? (XSL) (XSLT) ??? ????? XML ???????? ??? XslTransform ?????? ????? XML ????. XSL ?? ??? ????? ??? XML ?? ????? ????? ????? XML ???? ??? ????? XML ??? ?? ????? ????? XML ??? ?? ????? ??? ?????.

???????

???? ??????? ??????? ??????? ?????? ??? ????? ?????? ???????? ?????? ? ??? ??????? ???? ???????:
  • Microsoft Visual Studio .NET ?? Microsoft Visual Studio 2005
  • ?????? ????? ??????? (SDK) Microsoft .NET Quickstarts
????? ??? ??????? ??? ??????? ??? ???????? ???????:
  • ????????? XML
  • ????? ??? XML ????????
  • ???? ???? ???? XML Path (XPath)
  • xsl

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

?????? ??? ?????? ????? ?????? Books.xml ? Books.xsl. ????? ????? ??????? ?????? ?? Books.xml Books.xsl ?? ????? ??????? ????? ??????? ???? ?? ??????? ?? ?????? ????? .NET ??????? (SDK) QuickStarts. ??? ????? Books.xml ? Books.xsl ??? ?????? ??? ????? ??? ???????. ????? ?????? ??? ??? ??????? ?? ?????? ??????:
\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Samples\QuickStart\Howto\Samples\Xml\Transformxml\Cs
  1. ?? Visual Studio .NET ? ????? "????? C++ ?????" ????? ???????.

    ?????? ?? Visual Studio 2005 ? ????? "?????" ???? ???? ?????? CLR.
  2. ?? ?????? ????????? ???????? ??????? ?????? ???? ??? ????? ????? System.Xml:
    #using <System.XMl.Dll>
  3. ????? ??????? ????????XML ? ?????? ??????? Xsl ???? ?? ???? ????? ????????? ?? ????? ??????? ?????? ?? ????????? ????????. ?????? ??????? ???????? ??? ?? ?????? ?????????.
    using namespace System::Xml;
    using namespace System::Xml::Xsl;
    
  4. ??????? ????????? ???????? ??? ?? ????? ???? XslTransform ????? ??????? XML.
    XslTransform* myXslTransform;
    
  5. ????? ???? XslTransform ????. ????? ??? XslTransform ????? XSLT ?????? XSLT ??????? 1.0 ?????.
    myXslTransform = new XslTransform();
  6. ?????? ??????? ????? ????? ?????? XslTransform ?? ???? ???????. ???? ??????? ??????? ?????? ?????? ??? Books.xsl ??? ????? ISBN ???? ?? ?????. myXslTransform
    myXslTransform->Load(S"books.xsl");
    
  7. ??????? ??????? "?????" ???? ???????, ????? ?? ???? XML ???????? XML ????? ??????? ???. myXslTransform
    myXslTransform->Transform(S"books.xml", S"ISBNBookList.xml");
    
  8. ?????? ??????? ???????. ?? ??? ISBNBookList.xml ?? ??? ?? ???? ??? ??????? ????? ??.

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

// This is the main project file for VC++ application project 
// generated using an Application Wizard.

#include "stdafx.h"

#using <mscorlib.dll>
#using <System.XMl.Dll>
#include <tchar.h>

using namespace System;
using namespace System::Xml;
using namespace System::Xml::Xsl;


// This is the entry point for this application
int _tmain(void)
{
    XslTransform* myXslTransform;
    myXslTransform = new XslTransform();
    myXslTransform->Load(S"books.xsl");
    myXslTransform->Transform(S"books.xml", S"ISBNBookList.xml");

    return 0;
}
?????? ??? ????? ??????? ??? ??? ??????? ??? ?????? ??????? ??????? ?????? (/ clr:oldSyntax) ?? Visual C++ 2005 ????? ????? ????????? ???????? ?????? ?????. ?????? ??????? ??? ??? ??????? ??? ?????? ??????? ??????? ?????? ?? Visual C++ 2005 ???? ??????? ???????:
  1. ???? ??? Project ?? ???? ??? <ProjectName> ?????.

    ??????<ProjectName> ?????? ?????? ??? ???????.
  2. ?? ?????? ????? ????? ?? ???? ??? ???.
  3. ???? ?????? ??? ????? ????? ?????? ??? ? ?????? ??????? (/ clr:oldSyntax) ?? ??????? ??????? ????? "??? ????? ????? ??????" ?? ????? ?????? ???? ??? ????? ?? ???? ??? ?????.
?????? ??? ???? ?? ????????? ??? ??? ????? ????? ?????? ????? ?????? ?????? ??????? ??????? ?? ?????? ???? Microsoft ?????? ??? ?????:
/ ??? (??????? ??? ????? ????? ??????)
http://msdn2.microsoft.com/en-us/library/k8d11d4s.aspx
??? ??????? ????? ??????? ???????.
??????: ????? ??????? ??????? ????? ??????? ?????? ?? Visual C++ .NET 2003 ? ?? ????? ????? ?????? ??????? C4996. ???? ??? ???? ???? ??? ??????? ?? '??????:: Xml::Xsl::XslTransform::Transform' ?????.
????? ????????? ???????? ???? ?? ???? ????? ?????? ??????? C4996 ?????????.

???????: myXslTransform
myXslTransform->Transform(S"books.xml", S"ISBNBookList.xml");

??myXslTransform
myXslTransform->Transform(S"books.xml", S"ISBNBookList.xml", 0);

?????

????? ?? ????????? ??? ??? XslTransform ???? ?????? ".NET Framework ??? ?????" Microsoft ?????:
????? ?? ????????? ??? ??? XslTransform ?? ???? XslTransform ???? ?????? Microsoft .NET Framework ????? "???? ???????:
?????? ??? ?????? ?????? XSLT ? ASP .NET ? ???? ?????? MSDN Online ??????? ???? XML ???????:
????? ?? ????????? ??? XML ?? .NET ???? "XML ?? .NET: .NET Framework ???? XML ? ???? C# ???? ?????? ?????? ????? ???????" ??????? ?? Magazine MSDN ?? ???? Microsoft ?????? ??? ?????:
????? ?? ????????? ?????? ??? Visual C++ .NET ?? XML ?? .NET ? ???? ??????? ????? Usenet ???????:

???????

???? ???????: 815653 - ????? ??? ??????: 04/?? ??????/1428 - ??????: 6.3
????? ???
  • Microsoft Visual C++ 2005 Express Edition
  • Microsoft Visual C++ .NET 2003 Standard Edition
  • Microsoft Visual C++ .NET 2002 Standard Edition
????? ??????: 
kbmt kbhowtomaster kbxml kbhowto KB815653 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????815653

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

 

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