Advertisement

06.03.2008 at 01:29PM PDT, ID: 23454598
[x]
Attachment Details

Parsing XML script

Asked by holein5 in Perl Programming Language

Tags: Perl

I have the following code and need a regex that will pick out the 0% ( I want to be able to check the value of just this one table).  I don't want to get any of the other "percent values".  Keep in mind the "KB" values change as well. I was thinking I could load the entire xml code into an array and go down to "Used" on it's own line then search for the next percent figure like (\d+)|% or something like that.  There has to be a better way!  :-)
 

              Config (Broker Servers, Territories, Brokers, Doc Types, Stats) & Data (Client Queues, Documents, Logs)
                          <script>writeEndTD();</script>
      </tr>
        <script>swapRows();</script>
        <tr>
            <script>writeTD('rowdata-r');</script>
          Total Storage
          <script>writeEndTD();writeTDspan('row-l', 3);</script>
      
        <table width="100%">
        <tr>
          <td colspan=3></td><td width="100%"></td>
        </tr>
        <tr>
          <script>swapRows();writeTDnowrap('rowdata-r');</script>
            Max. Available
          <script>writeEndTD(); writeTDnowrap('rowdata-r');</script>
            10485760 KB
          <script>writeEndTD(); writeTDnowrap('rowdata-r');</script>
            100%
          <script>writeEndTD(); writeTD('rowdata-l');</script>
            <table width="100%" cellpadding="0">
            <tr>
                <td class="graph-free"><img border="0" src="../images/pixel.gif" height="6" width="1"></td>
            </tr>
          </table>
          <script>writeEndTD();</script>
        </tr>

        <tr>
          <script>writeTDnowrap('rowdata-r');</script>
            Used
          <script>writeEndTD(); writeTDnowrap('rowdata-r');</script>
            2783 KB
          <script>writeEndTD(); writeTDnowrap('rowdata-r');</script>
            0%
          <script>writeEndTD(); writeTD('rowdata-l');</script>

          <table width="0%" cellpadding="0">
            <tr>
                <td class="graph-used"><img border="0" src="../images/pixel.gif" height="6" width="1"></td>
            </tr>
          </table>
          <script>writeEndTD();</script>
        </tr>Start Free Trial
[+][-]06.03.2008 at 02:45PM PDT, ID: 21704867

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 09:26AM PDT, ID: 21711634

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 09:50AM PDT, ID: 21711866

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 11:01AM PDT, ID: 21712429

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 11:16AM PDT, ID: 21712542

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 11:16AM PDT, ID: 21712545

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: Perl
Sign Up Now!
Solution Provided By: Adam314
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.05.2008 at 01:01PM PDT, ID: 21723379

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 01:14PM PDT, ID: 21723503

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628