XML parsing in perl

Discussion in 'Perl' started by plimbayat, Oct 11, 2010.

  1. plimbayat

    plimbayat New Member

    Joined:
    Oct 11, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Bucharest, Romania
    Code:
    <SecScan ID="0" DisplayName="DE\AAC11FSR017001" Machine="AAC11FSR017001" Date="2009-05-25 16:05:53" LDate="25.05.2009 16:05" Domain="DE" IP="10.50.103.81" Grade="2" HotfixDataVersion="2009-05-12T06:13:31Z" MbsaToolVersion="2.1.2104.0" IsWorkgroup="False" SUSServer="" HFFlags="20" SecurityUpdatesScanDone="True" WUSSource="Microsoft Update (offline)">
        <IPList><IP addr="171075409" /></IPList>
        <Check ID="104" Grade="5" Type="1" Cat="1" Rank="1" Name="Local Account Password Test" URL1="Help/Check5315.html" URL2="Help/Check5315fix.html" >
            <Advice>Some user accounts (1 of 7) have blank or simple passwords, or could not be analyzed.</Advice>
            <Detail>
                <Head>
                    <Col>User</Col>
                    <Col>Weak Password</Col>
                    <Col>Locked Out</Col>
                    <Col>Disabled</Col>
                </Head>
                <Row Grade="0">
                    <Col>Guest</Col>
                    <Col>Weak</Col>
                    <Col>-</Col>
                    <Col>Disabled</Col>
                </Row>
                <Row Grade="0">
                    <Col>SUPPORT_388945a0</Col>
                    <Col>-</Col>
                    <Col>-</Col>
                    <Col>Disabled</Col>
                </Row>
                <Row Grade="5">
                    <Col>ASPNET</Col>
                    <Col>-</Col>
                    <Col>-</Col>
                    <Col>-</Col>
                </Row>
                <Row Grade="5">
                    <Col>Administrator</Col>
                    <Col>-</Col>
                    <Col>-</Col>
                    <Col>-</Col>
                </Row>
                <Row Grade="5">
                    <Col>IUSR_DUS11FSR499001</Col>
                    <Col>-</Col>
                    <Col>-</Col>
                    <Col>-</Col>
                </Row>
                <Row Grade="5">
                    <Col>IWAM_DUS11FSR499001</Col>
                    <Col>-</Col>
                    <Col>-</Col>
                    <Col>-</Col>
                </Row>
                <Row Grade="5">
                    <Col>MNUSYNCServer40&amp;</Col>
                    <Col>-</Col>
                    <Col>-</Col>
                    <Col>-</Col>
                </Row>
            </Detail>
        </Check>
    
    Hello Experts,
    Please help me with XML parsing in perl from above text.:worried:
     
    Last edited by a moderator: Oct 11, 2010
  2. chorny

    chorny New Member

    Joined:
    Jun 6, 2010
    Messages:
    20
    Likes Received:
    2
    Trophy Points:
    0
    Home Page:
    http://chorny.net
    Did you try using a module like XML::Smart?

    search.cpan.org/perldoc?XML::Smart
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice