Parsing MSSecure.xml for a child node when the parent node is known, using vbscript

Discussion in 'Scripting' started by R Dunn, Jun 14, 2004.

  1. R Dunn

    R Dunn Guest

    Ok, I'm parsing a shavlik output xml file (using HFNETCHK), which lists a
    series of hotfixes that are not installed on a PC. I can successfully read
    nodes/values from this XML file with no problems.

    I am attempting to cross-reference two values from the output xml file - as
    my script parses the output xml, it finds out
    a) missing bulletin IDs
    b) hotfix exe for each bulletin ID

    In my function that is called when each missing patch is parsed, I wish to
    pull information from mssecure.xml using those two parameters as identifying

    The end result is that I want to find out the patchlocationID from
    mssecure.xml for that appropriate bulletin ID where it matches the patchname
    (hotfix exe).

    So, for example, my input parameters might be (BulletinID) MS02-055, and
    (PatchName) Q323255_WXP_SP2_x86_ENU.exe.

    I can get my script to select the appropriate bulletin ID node from the
    mssecure.xml file, but I can't seem to get it to bring me the values of
    certain child nodes and their attributes.

    There are about 2 or 3 total patch nodes that appear under Bulletin, but
    this is the one that I want it to find and return "PatchLocationID" for.


    <BulletinDatastore DataVersion="" LastDataUpdate="6/8/2004"
    SchemaVersion="" LastSchemaUpdate="6/1/2004" ToolVersion="4.0"
    asp" EIToolVer="2.2.0" RevisionHistory="Shavlik MSSecure XML File" Fmt="MS"

    <Bulletin BulletinID="MS02-055" BulletinLocationID="73" FAQLocationID="73"
    FAQPageName="FQ02-055" Title="Unchecked Buffer in Windows Help Facility
    Could Enable Code Execution (Q323255)" DatePosted="2002/10/02"
    DateRevised="2002/10/02" Supported="Yes" Summary="Big ass description"
    <QNumber QNumber="Q323255"/>
    <Patch PatchName="Q323255_WXP_SP2_x86_ENU.exe" PatchLocationID="1502"
    SBID="0" SQNumber="Q323255" NoReboot="1" MSSeverityID="1" BugtraqID="5874"
    <AffectedProduct ProductID="120" FixedInSP="0">
    <AffectedServicePack ServicePackID="158"/>
    <AffectedServicePack ServicePackID="216"/>
    <AffectedProduct ProductID="121" FixedInSP="0">
    <AffectedServicePack ServicePackID="158"/>
    <AffectedServicePack ServicePackID="216"/>
    <FileChg FileChangeID="2114"/>
    <RegChg RegChangeID="1314"/>
    R Dunn, Jun 14, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.