日期:2014-05-18  浏览次数:20546 次

SQL server分解XML
下面是XML初始文件内容
XML code
<upd:Update xmlns:lar="http://schemas.microsoft.com/msus/2002/12/LogicalApplicabilityRules" xmlns:cmd="http://schemas.microsoft.com/msus/2002/12/UpdateHandlers/CommandLineInstallation" xmlns:bar="http://schemas.microsoft.com/msus/2002/12/BaseApplicabilityRules" xmlns:upd="http://schemas.microsoft.com/msus/2002/12/Update">
    <upd:UpdateIdentity UpdateID="9f79459a-d72e-49fc-acb0-1adbb2e63686" RevisionNumber="103"/>
    <upd:Properties DefaultPropertiesLanguage="en" UpdateType="Software" Handler="http://schemas.microsoft.com/msus/2002/12/UpdateHandlers/CommandLineInstallation" PublicationState="Published" CreationDate="2005-04-26T08:21:13.989Z" PublisherID="395392a0-19c0-48b7-a927-f7c15066d905" MaxDownloadSize="3320008" MinDownloadSize="0">
        <upd:InstallationBehavior RebootBehavior="CanRequestReboot"/>
        <upd:Language>zh-cn</upd:Language>
    </upd:Properties>
    <upd:LocalizedPropertiesCollection>
        <upd:LocalizedProperties>
            <upd:Language>en</upd:Language>
            <upd:Title>Critical Update for SQL Server 2000 Desktop Engine (Windows) on Windows Server 2003 (KB829358)</upd:Title>
        </upd:LocalizedProperties>
    </upd:LocalizedPropertiesCollection>
    <upd:Relationships>
        <upd:Prerequisites>
            <upd:UpdateIdentity UpdateID="30b6a809-9ba3-4c0f-9ca3-f569d01dab11"/>
            <upd:AtLeastOne>
                <upd:UpdateIdentity UpdateID="32b55feb-b5f5-47a7-8cc2-6a095c680267"/>
                <upd:UpdateIdentity UpdateID="0d27b716-280a-42a2-864a-bcd065c162e9"/>
            </upd:AtLeastOne>
            <upd:UpdateIdentity UpdateID="3e0afb10-a9fb-4c16-a60e-5790c3803437"/>
            <upd:AtLeastOne>
                <upd:UpdateIdentity UpdateID="dbf57a08-0d5a-46ff-b30c-7715eb9498e9"/>
                <upd:UpdateIdentity UpdateID="7f44c2a7-bc36-470b-be3b-c01b6dc5dd4e"/>
            </upd:AtLeastOne>
        </upd:Prerequisites>
    </upd:Relationships>
    <upd:ApplicabilityRules>
        <upd:IsInstalled>
            <bar:FileVersion Csidl="38" Path="Microsoft SQL Server\MSSQL$SHAREPOINT\binn\sqlservr.exe" Comparison="GreaterThanOrEqualTo" Version="2000.080.0884.00"/>
        </upd:IsInstalled>
        <upd:IsInstallable>
            <lar:And>
                <bar:FileVersion Csidl="38" Path="Microsoft SQL Server\MSSQL$SHAREPOINT\binn\sqlservr.exe" Comparison="EqualTo" Version="2000.080.0880.00"/>
                <bar:WUv4RegKeyValue Data="{65657C59-23A8-4974-B8E0-BA04EBD04E4F}" Value="ProductCode" Key="HKEY_LOCAL_MACHINE" Subkey="SOFTWARE\Microsoft\Microsoft SQL Server\Sharepoint\Setup"/>
                <bar:WUv4RegKeyValue Data="2052" Value="Language" Key="HKEY_LOCAL_MACHINE" Subkey="SOFTWARE\Microsoft\Microsoft SQL Server\SharePoint\MSSQLServer\CurrentVersion"/>
                <lar:Not>
                    <lar:Or>
                        <bar:RegKeyExists Key="HKEY_LOCAL_MACHINE" Subkey="SOFTWARE\Microsoft\Microsoft SQL Server\SHAREPOINT\Tracking\Shortcuts"/>
                        <bar:FileExists Csidl="38" Path="Microsoft SQL Server\MSSQL$SHAREPOINT\sqlsunin.ini"/>
                        <bar:FileExists Csidl="38" Path="M