Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Perl (http://www.go4expert.com/forums/perl/)
-   -   XML parsing in perl (http://www.go4expert.com/forums/xml-parsing-perl-t23550/)

plimbayat 11Oct2010 16:22

XML parsing in perl
 
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:

chorny 24Oct2010 15:16

Re: XML parsing in perl
 
Did you try using a module like XML::Smart?

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


All times are GMT +5.5. The time now is 07:13.