How to parse select lines in an html string?

I've been writing a program to deal with demographic data and the first server it calls returns an xml string. However, the backup server returns an html string instead of an xml string, so the formatting is a bit different. I was going to use a regex as I did with the xml server, but regex's don't work that well with html. i was wondering if you could offer some advice on how to effectively parse the html string? It is in this format <html>
<head>
<meta name="Description" content="ZIP Code Demographics"/>
<meta name="Keywords" content="zip, zip code, zipcode, demographics, 2000, county, lookup, city, state"/>
<title>ZIP Code Demographics Lookup</title>
<link rel="stylesheet" type="text/css" href="http://www.MelissaData.com/style.css" />
</head>
<body topmargin="0" onload="document.getElementById('text1').focus()">
<div align="center">
<!--Start of top.asp 9/2/08 Ray-->
<script type='text/javaScript' src='http://www.melissadata.com/cgi-bin/lib.js'></script>
    <table align="center" border="0" cellpadding="0" cellspacing="0" width="744" style="font-size:8pt; font-family:Arial; color: #666666">
        <tr valign='middle'  height='24'>
             <td align="left" rowspan=2><a href="/index.htm">
                <img border="0" src="http://www.melissadata.com/home/new1207/MelissaData-logo.gif" alt="Melissa Data Home Page" /></a><img border="0" src="http://www.melissadata.com/home/new1207/1-800-number.gif" width="112" height="22" alt="Call 1-800-MELISSA for Data Quality Solutions" /></td>
            <td colspan='2' align="right">
                <font size="1" face="Verdana">
            <script type="text/javaScript">var r=uCookie("r"); var s=uCookie("s"); var n=uCookie("n");
                //document.write (document.cookie);
                if (r == "YES" && s == "IN" && n != "" ) document.write ("Hello <b>" + n.replace(/\+/g," ") + "<\/b>   [<font size=1><a href=/user/signout.aspx>Sign out<\/a>, <a href=/user/user_account.aspx>My Account<\/a></font>]");else document.write (" <a href=/user/signin.aspx>Sign In<\/a> ");
            </script></font></td></tr>
        <tr height='24'>
            <form method="get" action="http://w2.melissadata.com/cgi-bin/search.asp">          
            <td align="right" height=30>               
                <a href="/netcart/order1.aspx"><img border="0" src="http://www.melissadata.com/home/new1207/Hompage-shoppincart.gif" alt="Shopping Cart" /></a>
                <a style="color: #666666" href="/netcart/order1.aspx">Buy</a>
                | <a style="color: #666666" href="/cgi-bin/newsletters.asp">Newsletters</a> | Search
                <input name="indata" style="font-size:7pt; font-family:Arial" size="10" /><input type="image" src="http://www.melissadata.com/home/new1207/hompage-arrow.gif" style="vertical-align: middle"  value="Search" name="submit1" />
    </td></form></tr>
    </table>
    <style="font-size:10pt; font-family:Arial; color: #0066cc" type="text/css">
    <table align="center" border="0" cellpadding="4" cellspacing="0" width="744">
        <tr>
            <td align="center" width="106">
                <b><a style="text-decoration: none" href="/products/index.htm">Products</a></b></td>
            <td align="center" width="106">
                <b><a style="text-decoration: none" href="/solutions/index.htm">Solutions</a></b></td>
            <td align="center" width="106">
                <b><a style="text-decoration: none" href="/download.htm">Downloads</a> </b></td>
            <td align="center" width="106">
                <b><a style="text-decoration: none" href="/tech/tech.html">Support</a> </font></td>
            <td align="center" width="106">
                <b><a style="text-decoration: none" href="/resources/index.htm">Resources</a></b></td>
            <td align="center" width="106">
                <b><a style="text-decoration: none" href="/lookups/index.htm">Lookups</a></b></td>
            <td align="center" width="106">
                <b><a style="text-decoration: none" href="/cgi-bin/contact.asp">Contact Us</a></b></td></tr>   
    </table></style>
<!-- Start Image BanAd.asp-->
<div align=center><a href='/cgi-bin/BanAd.asp?id=135'><img alt='Click here' src='/cgi-bin/BanImage.asp?id=135'></a></div><!-- End Image BanAd.asp-->
<!--TitleBorder in Shared.asp -->
<table width="744" cellspacing=0 border=1 bgcolor="#F7F7F7"><tr><td align=left><font color="#ce0000" size="5">ZIP Code Demographics Lookup</font></td><form><td width=120 align=center><input title='Help for ZIP Code Demographics Lookup' type=button onClick=openHelpWindow('/lookups/help/zipdemo2000.asp') value=Help>  <a title='Lookups home page' href=/lookups/index.htm>Index</a></td></form></tr></table>
<!--TitleBorder End-->
<form action="ZipDemo2000.asp" name="Demo2000">
<table width="400" class="Disp">
<tr><td align="center"><b>Enter a 5-Digit ZIP Code</b>
    <input class="Disp" title="Enter a ZIP Code" id="text1" size="5" name="ZipCode" maxlength="5"/> <input type="submit" value="Submit"/>
</td></tr>
</table>
</form>
<table cellspacing="0" cellpadding="1" width="750" border="2" bgcolor="#ffffcc">
<tr bgcolor="lightblue"><td colspan="4" align="center">Year 2000 Demographics of <br><b>ZIP Code 90041</b><br><b>LOS ANGELES, California</b><br><a href=mapzipv.asp?zip=90041>Map of ZIP Code</a></td></tr>
<tr bgcolor="#bbffff"><td>TOTAL POPULATION [1]</td><td >P001</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Total population</td><td >P001</td></tr>
<tr><td>   Total</td><td align=right ><b> 27,864</b></td></tr>
<tr bgcolor="#bbffff"><td>URBAN AND RURAL [6]</td><td >P002</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Total population</td><td >P002</td></tr>
<tr><td>   Total:</td><td align=right ><b> 27,864</b></td></tr>
<tr><td>         Urban:</td><td align=right ><b> 27,864</b></td></tr>
<tr><td>           Inside urbanized areas</td><td align=right ><b> 27,864</b></td></tr>
<tr><td>           Inside urban clusters</td><td align=right ><b> 0</b></td></tr>
<tr><td>         Rural</td><td align=right ><b> 0</b></td></tr>
<tr><td>         Not defined for this file</td><td align=right ><b> 0</b></td></tr>
<tr bgcolor="#bbffff"><td>RACE [8]</td><td >P007</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Total population</td><td >P007</td></tr>
<tr><td>   Total:</td><td align=right ><b> 27,864</b></td></tr>
<tr><td>         White alone</td><td align=right ><b> 13,429</b></td></tr>
<tr><td>         Black or African American alone</td><td align=right ><b> 630</b></td></tr>
<tr><td>         American Indian and Alaska Native alone</td><td align=right ><b> 242</b></td></tr>
<tr><td>         Asian alone</td><td align=right ><b> 7,123</b></td></tr>
<tr><td>         Native Hawaiian and Other Pacific Islander alone</td><td align=right ><b> 42</b></td></tr>
<tr><td>         Some other race alone</td><td align=right ><b> 4,738</b></td></tr>
<tr><td>         Two or more races</td><td align=right ><b> 1,660</b></td></tr>
<tr bgcolor="#bbffff"><td>HISPANIC OR LATINO BY RACE [17]</td><td >P008</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Total population</td><td >P008</td></tr>
<tr><td>   Total:</td><td align=right ><b> 27,864</b></td></tr>
<tr><td>         Not Hispanic or Latino:</td><td align=right ><b> 17,109</b></td></tr>
<tr><td>           White alone</td><td align=right ><b> 8,468</b></td></tr>
<tr><td>           Black or African American alone</td><td align=right ><b> 555</b></td></tr>
<tr><td>           American Indian and Alaska Native alone</td><td align=right ><b> 105</b></td></tr>
<tr><td>           Asian alone</td><td align=right ><b> 7,053</b></td></tr>
<tr><td>           Native Hawaiian and Other Pacific Islander alone</td><td align=right ><b> 30</b></td></tr>
<tr><td>           Some other race alone</td><td align=right ><b> 73</b></td></tr>
<tr><td>           Two or more races</td><td align=right ><b> 825</b></td></tr>
<tr><td>         Hispanic or Latino:</td><td align=right ><b> 10,755</b></td></tr>
<tr><td>           White alone</td><td align=right ><b> 4,961</b></td></tr>
<tr><td>           Black or African American alone</td><td align=right ><b> 75</b></td></tr>
<tr><td>           American Indian and Alaska Native alone</td><td align=right ><b> 137</b></td></tr>
<tr><td>           Asian alone</td><td align=right ><b> 70</b></td></tr>
<tr><td>           Native Hawaiian and Other Pacific Islander alone</td><td align=right ><b> 12</b></td></tr>
<tr><td>           Some other race alone</td><td align=right ><b> 4,665</b></td></tr>
<tr><td>           Two or more races</td><td align=right ><b> 835</b></td></tr>
<tr bgcolor="#bbffff"><td>SEX BY AGE [49]</td><td >P012</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Total population</td><td >P012</td></tr>
<tr><td>   Total:</td><td align=right ><b> 27,864</b></td></tr>
<tr><td>         Male:</td><td align=right ><b> 13,324</b></td></tr>
<tr><td>           Under 5 years</td><td align=right ><b> 862</b></td></tr>
<tr><td>           5 to 9 years</td><td align=right ><b> 974</b></td></tr>
<tr><td>           10 to 14 years</td><td align=right ><b> 872</b></td></tr>
<tr><td>           15 to 17 years</td><td align=right ><b> 525</b></td></tr>
<tr><td>           18 and 19 years</td><td align=right ><b> 511</b></td></tr>
<tr><td>           20 years</td><td align=right ><b> 257</b></td></tr>
<tr><td>           21 years</td><td align=right ><b> 287</b></td></tr>
<tr><td>           22 to 24 years</td><td align=right ><b> 569</b></td></tr>
<tr><td>           25 to 29 years</td><td align=right ><b> 969</b></td></tr>
<tr><td>           30 to 34 years</td><td align=right ><b> 1,024</b></td></tr>
<tr><td>           35 to 39 years</td><td align=right ><b> 1,140</b></td></tr>
<tr><td>           40 to 44 years</td><td align=right ><b> 1,077</b></td></tr>
<tr><td>           45 to 49 years</td><td align=right ><b> 987</b></td></tr>
<tr><td>           50 to 54 years</td><td align=right ><b> 822</b></td></tr>
<tr><td>           55 to 59 years</td><td align=right ><b> 647</b></td></tr>
<tr><td>           60 and 61 years</td><td align=right ><b> 215</b></td></tr>
<tr><td>           62 to 64 years</td><td align=right ><b> 270</b></td></tr>
<tr><td>           65 and 66 years</td><td align=right ><b> 155</b></td></tr>
<tr><td>           67 to 69 years</td><td align=right ><b> 258</b></td></tr>
<tr><td>           70 to 74 years</td><td align=right ><b> 320</b></td></tr>
<tr><td>           75 to 79 years</td><td align=right ><b> 252</b></td></tr>
<tr><td>           80 to 84 years</td><td align=right ><b> 183</b></td></tr>
<tr><td>           85 years and over</td><td align=right ><b> 148</b></td></tr>
<tr><td>         Female:</td><td align=right ><b> 14,540</b></td></tr>
<tr><td>           Under 5 years</td><td align=right ><b> 864</b></td></tr>
<tr><td>           5 to 9 years</td><td align=right ><b> 949</b></td></tr>
<tr><td>           10 to 14 years</td><td align=right ><b> 875</b></td></tr>
<tr><td>           15 to 17 years</td><td align=right ><b> 534</b></td></tr>
<tr><td>           18 and 19 years</td><td align=right ><b> 592</b></td></tr>
<tr><td>           20 years</td><td align=right ><b> 285</b></td></tr>
<tr><td>           21 years</td><td align=right ><b> 264</b></td></tr>
<tr><td>           22 to 24 years</td><td align=right ><b> 600</b></td></tr>
<tr><td>           25 to 29 years</td><td align=right ><b> 932</b></td></tr>
<tr><td>           30 to 34 years</td><td align=right ><b> 1,035</b></td></tr>
<tr><td>           35 to 39 years</td><td align=right ><b> 1,026</b></td></tr>
<tr><td>           40 to 44 years</td><td align=right ><b> 1,131</b></td></tr>
<tr><td>           45 to 49 years</td><td align=right ><b> 1,038</b></td></tr>
<tr><td>           50 to 54 years</td><td align=right ><b> 970</b></td></tr>
<tr><td>           55 to 59 years</td><td align=right ><b> 689</b></td></tr>
<tr><td>           60 and 61 years</td><td align=right ><b> 261</b></td></tr>
<tr><td>           62 to 64 years</td><td align=right ><b> 327</b></td></tr>
<tr><td>           65 and 66 years</td><td align=right ><b> 208</b></td></tr>
<tr><td>           67 to 69 years</td><td align=right ><b> 307</b></td></tr>
<tr><td>           70 to 74 years</td><td align=right ><b> 482</b></td></tr>
<tr><td>           75 to 79 years</td><td align=right ><b> 450</b></td></tr>
<tr><td>           80 to 84 years</td><td align=right ><b> 331</b></td></tr>
<tr><td>           85 years and over</td><td align=right ><b> 390</b></td></tr>
<tr bgcolor="#bbffff"><td>MEDIAN AGE BY SEX [3]</td><td >P013</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Total population</td><td >P013</td></tr>
<tr bgcolor="#bbffff"><td>Median age--</td><td >P013</td></tr>
<tr><td>         Both sexes</td><td align=right ><b> 35.3</b></td></tr>
<tr><td>         Male</td><td align=right ><b> 34.0</b></td></tr>
<tr><td>         Female</td><td align=right ><b> 36.6</b></td></tr>
<tr bgcolor="#bbffff"><td>HOUSEHOLDS [1]</td><td >P015</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Households</td><td >P015</td></tr>
<tr><td>   Total</td><td align=right ><b> 9,375</b></td></tr>
<tr bgcolor="#bbffff"><td>POPULATION IN HOUSEHOLDS [1]</td><td >P016</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Population in households</td><td >P016</td></tr>
<tr><td>   Total</td><td align=right ><b> 26,409</b></td></tr>
<tr bgcolor="#bbffff"><td>AVERAGE HOUSEHOLD SIZE [1]</td><td >P017</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Households</td><td >P017</td></tr>
<tr><td>   Average household size</td><td align=right ><b> 2.82</b></td></tr>
<tr bgcolor="#bbffff"><td>FAMILIES [1]</td><td >P031</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Families</td><td >P031</td></tr>
<tr><td>   Total</td><td align=right ><b> 6,326</b></td></tr>
<tr bgcolor="#bbffff"><td>POPULATION IN FAMILIES [1]</td><td >P032</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Population in families</td><td >P032</td></tr>
<tr><td>   Total</td><td align=right ><b> 21,653</b></td></tr>
<tr bgcolor="#bbffff"><td>AVERAGE FAMILY SIZE [1]</td><td >P033</td></tr>
<tr bgcolor="#bbffff"><td>Universe: Families</td><td >P033</td></tr>
<tr><td>   Average family size</td><td align=right ><b> 3.42</b></td></tr>
</table>
<!-- Start of bottom.asp-->
    <hr width="730" />
    <span style='font-size:8pt'>
    <a href="http://www.melissadata.com/enews/advisorarticles/index.htm">Articles</a> | 
    <a href="javascript:window.external.AddFavorite('http://www.melissadata.com/lookups/zipdemo2000.asp', 'ZIP Code Demographics Lookup')" target="_self">Bookmark</a> | 
    <a href="http://www.melissadata.com/cgi-bin/improve.asp?web">How Can We Improve?</a> | 
    <a href="http://www.melissadata.com/cgi-bin/batchprocessing.asp">Batch Processing</a> | 
    <a href="http://www.melissadata.com/cgi-bin/send.asp?Send2Friend">Email to Friend</a> | 
    <a href="http://www.melissadata.com/cgi-bin/catalogres.asp">Free Catalog</a> | 
    <a href="http://forum.melissadata.com/default.aspx">Forums</a> | 
    <a href="http://www.melissadata.com/terms-of-use.htm">Terms of Use</a>
    <font color="#ddddff"><br />  
    <script type="text/javascript"> var r=uCookie("r"); var f=uCookie("f"); var c=uCookie("c"); var l=uCookie("l");
        //document.write (r + ":" + f + ":" + c + ":" + l);</script></font></span>
<!-- End of bottom.asp-->
</div>
</body>
</html>.
The numbers I wanted to extract are the age groups of "Under 5 years," "5 to 9 years," "10 to 14 years," and "15 to 17 years," from both male and female groups, which should add up to 8 numbers total. Here is the backup server portion of my program as well, so you can see what i'm doing.
import java.net.*;
import java.net.URL;
import java.net.URLConnection;
import java.net.HttpURLConnection;
import java.io.*;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.StringReader;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.Arrays;
public class TriParser
     static Scanner sc = new Scanner(System.in);
     public static int[] findValues(String text, String gender, String[] labels)
            Matcher m = Pattern.compile("<td>(.*?)</td>",
           Pattern.MULTILINE | Pattern.DOTALL).matcher(text);
            String allValues = m.find() ? m.group(1) : null; // TODO: handle if 'null' is returned!
            int[] values = new int[labels.length];
            for(int i = 0; i < labels.length; i++)
              m = Pattern.compile(labels[i]+"[^>]+>(\\d+)").matcher(allValues);
              if(m.find()) values[i] = Integer.parseInt(m.group(1));
            return values;
     public static void main(String[] args) throws Exception
        int zip;
        boolean validInteger;//indicates if zipcode is valid (has to be 5 digits)
        do
                System.out.print("Enter a five-digit zipcode: ");
                zip = sc.nextInt();
                validInteger = true;
                if((zip < 10000) || (zip > 99999))
                        validInteger = false;
                        System.out.println("Invalid Entry.  Please re-enter zipcode.");
        while(!validInteger);
        System.out.println(zip);     
        //String requestPart1 ="query=PREFIX+dc%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E+%0D%0APREFIX+census%3A+%3Chttp%3A%2F%2Fwww.rdfabout.com%2Frdf%2Fschema%2Fcensus%2F%3E+%0D%0APREFIX+census1%3A+%3Ctag%3Agovshare.info%2C2005%3Ardf%2Fcensus%2Fdetails%2F100pct%2F%3E+%0D%0A%0D%0ADESCRIBE+%3Ftable+WHERE+%7B+%0D%0A+%3Chttp%3A%2F%2Fwww.rdfabout.com%2Frdf%2Fusgov%2Fgeo%2Fcensus%2Fzcta%2F";
        //String requestPart2 = "" + zip; // zipcode goes here
        //String requestPart3 ="%3E+census%3Adetails+%3Fdetails+.+%0D%0A+%3Fdetails+census1%3AtotalPopulation+%3Ftable+.+%0D%0A+%3Ftable+dc%3Atitle+%22SEX+BY+AGE+%28P012001%29%22+.+%0D%0A%7D%0D%0A&outputMimeType=text%2Fxml";
          String requestPart1 = "" + zip;
        String response = "";
        URL url = new URL("http://www.melissadata.com/lookups/zipdemo2000.asp?ZipCode="+requestPart1);
        URLConnection conn = url.openConnection();
        // Set connection parameters.
        conn.setDoInput (true);
        conn.setDoOutput (true);
        conn.setUseCaches (false);
        // Make server believe we are form data…
        conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
        DataOutputStream out = new DataOutputStream (conn.getOutputStream ());
        // Write out the bytes of the content string to the stream.
        out.writeBytes(requestPart1);
        out.flush ();
        out.close ();
        // Read response from the input stream.
        BufferedReader in = new BufferedReader (new
        InputStreamReader(conn.getInputStream ()));
        String temp;
        while ((temp = in.readLine()) != null)
             response += temp + "\n"; // needs to be parsed to calculate the 4 numbers
        temp = null;
        in.close ();
          //System.out.println("Server response:\n" + response);
          // how to call the method:
          String[] ages = {"Under 5 years", "5 to 9 years", "10 to 14 years", "15 to 17 years"};
          String[] ages1 = {"Under 5 years"};
          String[] ages2 = {"5 to 9 years"};
          String[] ages3 = {"10 to 14 years"};
          String[] ages4 = {"15 to 17 years"};
          String female1 = Arrays.toString(findValues(response, "female", ages1));
          String female2 = Arrays.toString(findValues(response, "female", ages2));
          String female3 = Arrays.toString(findValues(response, "female", ages3));
          String female4 = Arrays.toString(findValues(response, "female", ages4));
          String female = female1 + "+" + female2 + "<" + female3 + ">" + female4 + "&";
          String male1 = Arrays.toString(findValues(response, "male", ages1));
          String male2 = Arrays.toString(findValues(response, "male", ages2));
          String male3 = Arrays.toString(findValues(response, "male", ages3));
          String male4 = Arrays.toString(findValues(response, "male", ages4));
          String male = male1 + "+" + male2 + "<" + male3 + ">" + male4 + "&";
          System.out.println(female);
          System.out.println(male);
        //Simplified string response, makes use of regular expressions
        //Start manipulation of numbers inside string
        int left = female.indexOf("[");
          int right = female.indexOf("]");
          // pull out the text inside the parens
          String parsed = female.substring(left+1, right);
          double parseddub = Double.parseDouble(parsed);
          //divide the group Under5Years into Under12Mo and 1to4Yr
          double Group1Adub = parseddub*.25;//25% for Under12Mo
          Group1Adub = Math.ceil(Group1Adub);
          int Group1A =(int)Group1Adub;
          double Group1Bdub = parseddub*.75;//75% for 1to4Yr
          Group1Bdub = Math.ceil(Group1Bdub);
          int Group1B =(int)Group1Bdub;
          int left2 = female.indexOf("+");
          int right2 = female.indexOf("<");
          // pull out the text inside the parens
          String parsed2 = female.substring(left2+2, right2-1);
          double parsed2dub = Double.parseDouble(parsed2);
          //divide the group 5to9Yr into 5Yr, 6to7Yr, and 8to9Yr
          double Group2Adub = parsed2dub*.2;//20% for 5Yr
          Group2Adub = Math.ceil(Group2Adub);
          int Group2A =(int)Group2Adub;
          double Group2Bdub = parsed2dub*.4;//40% for 6to7Yr
          Group2Bdub = Math.ceil(Group2Bdub);
          int Group2B =(int)Group2Bdub;
          double Group2Cdub = parsed2dub*.2;//20% for 8Yr
          Group2Cdub = Math.ceil(Group2Cdub);
          int Group2C =(int)Group2Cdub;
          double Group2Ddub = parsed2dub*.2;//20% for 9Yr
          Group2Ddub = Math.ceil(Group2Ddub);
          int Group2D =(int)Group2Ddub;
          int left3 = female.indexOf("<");
          int right3 = female.indexOf(">");
          // pull out the text inside the brackets
          String parsed3 = female.substring(left3+2, right3-1);
          int Group3A = Integer.valueOf(parsed3).intValue();
          int left4 = female.indexOf(">");
          int right4 = female.indexOf("&");
          // pull out the text inside the brackets
          String parsed4 = female.substring(left4+2, right4-1);
          int Group4A = Integer.valueOf(parsed4).intValue();
          int left5 = male.indexOf("[");
          int right5 = male.indexOf("]");
          String parsed5 = male.substring(left5+1, right5);
          double parsed5dub = Double.parseDouble(parsed5);
          //divide the group Under5Years into Under12Mo and 1to4Yr
          double Group5Adub = parsed5dub*.25;//25% for Under12Mo
          Group5Adub = Math.ceil(Group5Adub);
          int Group5A =(int)Group5Adub;
          double Group5Bdub = parsed5dub*.75;//75% for 1to4Yr
          Group5Bdub = Math.ceil(Group5Bdub);
          int Group5B =(int)Group5Bdub;     
          int left6 = male.indexOf("+");
          int right6 = male.indexOf("<");
          // pull out the text inside the parens
          String parsed6 = male.substring(left6+2, right6-1);
          double parsed6dub = Double.parseDouble(parsed6);
          //divide the group 5to9Yr into 5Yr, 6to7Yr, and 8to9Yr
          double Group6Adub = parsed6dub*.2;//20% for 5Yr
          Group6Adub = Math.ceil(Group6Adub);
          int Group6A =(int)Group6Adub;
          double Group6Bdub = parsed6dub*.4;//40% for 6to7Yr
          Group6Bdub = Math.ceil(Group6Bdub);
          int Group6B =(int)Group6Bdub;
          double Group6Cdub = parsed6dub*.2;//20% for 8Yr
          Group6Cdub = Math.ceil(Group6Cdub);
          int Group6C =(int)Group6Cdub;
          double Group6Ddub = parsed6dub*.2;//20% for 9Yr
          Group6Ddub = Math.ceil(Group6Ddub);
          int Group6D =(int)Group6Ddub;
          int left7 = male.indexOf("<");
          int right7 = male.indexOf(">");
          // pull out the text inside the brackets
          String parsed7 = male.substring(left7+2, right7-1);
          int Group7A = Integer.valueOf(parsed7).intValue();
          int left8 = male.indexOf(">");
          int right8 = male.indexOf("&");
          // pull out the text inside the brackets
          String parsed8 = male.substring(left8+2, right8-1);
          int Group8A = Integer.valueOf(parsed8).intValue();
          //female
          int Group1 = Group1A;
          int Group2 = Group1B + Group2A;
          int Group3 = Group2A + Group2B + Group2C;
          int Group4 = Group2C + Group2D + Group3A + Group4A;     
          //male
          int Group5 = Group5A;
          int Group6 = Group5B + Group6A;
          int Group7 = Group6A + Group6B + Group6C;
          int Group8 = Group6C + Group6D + Group7A + Group8A;
          System.out.println("Server response:\n" + "\n" + "Female");
          System.out.println("Under 12 Months:    " + Group1);
          System.out.println("1 to 4 Years Old:   " + Group2);
          System.out.println("5 to 8 Years Old:   " + Group3);
          System.out.println("8 to 17 Years Old:  " + Group4);
          System.out.println("\n" + "Male");
          System.out.println("Under 12 Months:    " + Group5);
          System.out.println("1 to 4 Years Old:   " + Group6);
          System.out.println("5 to 8 Years Old:   " + Group7);
          System.out.println("8 to 17 Years Old:  " + Group8);
}Currently it functions using a regex, and executes, but doesn't return any numbers, only returns zeros...If you could help me out with this, that would be amazing! Thanks so much.

hmm, is there a way to do it without an external API? Of course there is.
looks like i have to download the API and the idea behind the program is to make it so multiple people running only java can run the program, without having to download APIs, ect, to make it run. Not sure if that is what JTidy entails, but is that what you were suggesting?Personally, I don't understand the resistance to using well-tested tools already in existence as opposed to trying to rewrite a shallow facsimile of said tools. You can distribute the JTidy library along with your application and save yourself a great deal of development and debugging effort.
~

Similar Messages

  • How no to select lines with NULL values

    Hi,
    I am not a newbie newbie in SQL but I do not understand why I cannot retrieve the lines where there are null values.
    The table observatoire.fiche has 2 columns with default values set to NULL : total_heures, and total_heures_exceptionnelles. These are numeric types columns.
    I want not to select lines where :
    total_heures equal NULL AND total_heures_exceptionnelles = NULLI have tried this but I do get an "Invalid relational operator" error message.
    select a.nom || ' ' || a.prenom d, a.agent_id r
    from   OBSERVATOIRE.AGENT a, observatoire.fiche b
    where  a.agent_id = b.agent_id
    and    b.total_heures NOT NULL AND total_heures_exceptionnelles NOT NULL
    group by a.nom, a.prenom, a.agent_id
    order by a.nomCould you help me ?
    Thank you for your kind answers.

    Satyaki_De wrote:
    I think this is not the good way to do it. Did you check my solution? It should work the same output as your solution.Really ?
    test@ORA10G>
    test@ORA10G> -- (1)
    test@ORA10G> with t as (
      2    select 1 as x, 10 as total_heures, null as total_heures_exceptionnelles from dual union all
      3    select 1, null, 20   from dual union all
      4    select 1, null, null from dual union all
      5    select 1, 30, 40     from dual)
      6  --
      7  select x, total_heures, total_heures_exceptionnelles
      8  from   t
      9  where  x = 1
    10  AND NOT ( total_heures IS  NULL
    11            AND
    12            total_heures_exceptionnelles IS NULL
    13          );
             X TOTAL_HEURES TOTAL_HEURES_EXCEPTIONNELLES
             1           10
             1                                        20
             1           30                           40
    test@ORA10G>
    test@ORA10G> -- (2)
    test@ORA10G> with t as (
      2    select 1 as x, 10 as total_heures, null as total_heures_exceptionnelles from dual union all
      3    select 1, null, 20   from dual union all
      4    select 1, null, null from dual union all
      5    select 1, 30, 40     from dual)
      6  --
      7  select x, total_heures, total_heures_exceptionnelles
      8  from   t
      9  where  x = 1
    10  AND    total_heures IS NOT NULL
    11  AND    total_heures_exceptionnelles IS NOT NULL;
             X TOTAL_HEURES TOTAL_HEURES_EXCEPTIONNELLES
             1           30                           40
    test@ORA10G>
    test@ORA10G>isotope

  • How to display selected records on one HTML page?

    Hi,
    I would like to display selected part of records on one page in HTML region. For example I have a Master - Detail table set named Procedures and Tasks (each Procedure can have one or more tasks)
    I would like to be able to display all Tasks for a given Procedure in one HTML region on a page... The problem is that the number of tasks vary between procedures and can change in time. Also, the 'task description' can be very large so a simple report list of all tasks is something I cannot use... (I would like eg for the task name to be here, and the task_description to be there - unlike the report where everything is in one line...) The following are my ideas but non of them seemed to be feasable here...
    1. Use a report based on vertical columns (However I am using Theme 10 for which there are no vertical column templates. The only vertical templates I can see are the default ones but I have no idea how to customize them - where are they?)
    2. In HTML region use &ITEM_NAME. substitutions. In order to display more than one &EMN_NAME. (based on eg. EMPID) I suspect that I would need to write some kind of javascript loop. Has anyone have an idea about how would such a script look like?
    3. Display each Task in a separate screen. This is something I would want least but better than nothing - to have a customized report which would display one task at a time with some kind of pagination to it...
    Please let me know if someone has tried something simmilar or maybe there is a 4th option which will be simpler and easier...
    Many thanks,
    Pawel.
    I tried to make a very simple illustration of what I would like to achive here:
    http://htmldb.oracle.com/pls/otn/f?p=44995:3:9461299983704828937::::
    Message was edited by:
    padmocho

    Just to answer this one myself....
    In order to achive the above I used a PL/SQL Dynamic Content page and entered a html content in htp.prn('');
    Then, I created a PL/SQL LOOP which searches through the various rows...
    In the end, whenever I wanted to display html content I just used htp.prn and for variables I used htp.p(<var_name>);
    Maybe, it helps ;)

  • How can I change line colors in HTML reports?

    I have a VI that is creating an HTML report based on a table of results. I change the back ground color of the line based on failed results. However this line color change is not seen in the HTML reports. Can anyone give me a good way of basically transferring the properties of my table to the HTML report? Is it possible? Thanks in advance for any help.

    Greg - Thanks for the reply. I figured this out doing some more research. The line that I needed was "<BACKLOG="#PAYOFF">Your Cell Text</ID>. The problem I was having was that line is needed in front of the rest of the font formatting commands. For example here is my original line:
    <ID WIDTH="200"><BACKLOG="#PAYOFF"><FONT SIZE=+0 COLOR="#OFF">8.3.12.1</ID>
    The bold part in the line above is what I added. With the cell color added like this it actually created another cell and pushed existing ones one cell to the right. It then colored the second cell in the row and left the first one blank. Through looking up more examples I found that I was actually putting the cell color command in the middle of the font formatting command. So I tried putting it at the end and it then did nothing. The only way I could get the cell in the table to change and not change anything else was using the syntax below.
    <ID BACKLOG="#PAYOFF"><WIDTH="200"><FONT SIZE=+0 COLOR="#OFF">8.3.12.1</ID>
    Troy

  • How to parse out curly quotes from a string

    Hi,
    I am writing a web application, where people will be copying from a Word Document into a text area. Then I get a String from the parameter passed.
    How can I parse out curly quotes and mdashes from this String? Are there specific character codes that I can parse out to replace them with regular quote characters or html quote characters?
    Thanks,
    Gabe

    Interesting problem and one that we had to deal with a couple of years ago. I think you might be talking about smart quotes and these are actually control characters used by MS products. They show up as squares in HTML unless properly dealt with. Try downloading some UNICODE charts to find out the values of these characters. I think they are something like 0044 and 0042 but I cannot remember off hand.

  • How to parse characters non ascii in a string

    i am stucked in this crictical problem and i don't know how to cater this. I sometimes receive this String ����&#9658;&#9787;&#9786; and sometimes these are non US-ASCII characters. These ����&#9658;&#9787;&#9786; characters are replaced by ????? and is represented as it is. I sometime receive this character �� too. These characters are in ANSI list but i want to receive only US-ASCII. Please help me out that how to identify these characters in the string.

    Basically i am getting that string from the user in an sms. The text of the sms is saved in the database.I get that sms from database in string form. now i want to parse the string to identify the non us-ascii characters in the string. This parsing is important because when i try to post data on the url i get the http response code 400 which creates an exception and i get stucked in an infinite while loop.
    HttpURLConnection urlcon =null;
    String postingdata="&message="+ URLEncoder.encode(ob.getmessage(),"UTF-8")
    System.out.println(postingdata);
    URL url = new URL("http://someurl");
    urlcon = (HttpURLConnection)url.openConnection();
    urlcon.setDoOutput(true);
    urlcon.setRequestMethod("POST");
    OutputStreamWriter wr = new OutputStreamWrite(urlcon.getOutputStream());
    wr.write(postingdata);
    wr.flush();
    BufferedReader rd = new BufferedReader(new InputStreamReader(urlcon.getInputStream()));
    rd.close();
    wr.close();

  • How to parse the date value for the string 2003-04-25 11:53:11 IST

    This is my database output for the date value(2003-04-25 11:53:11 IST). How to convet this string to Timestamp date value. Any one pl. help me

    BUT ... there is a public static Timestamp valueOf(String s) method in the Timestamp class that might help.
    http://java.sun.com/j2se/1.4.1/docs/api/java/sql/Timestamp.html#valueOf(java.lang.String)

  • How do convert selected item in JComboBox to String?

    I'm trying to get an option from a JComboBox to print in a JTextArea upon click.
    I've tried many ways, including converting to String, String array, and using textArea.append which doesn't seem to work either. .
    can anyone help?

    toString and actionlistener, bah. figured it out, sorry to trouble you :)

  • Parsing and extraction of numbers from select lines in a string

    hey guys, i've been running into some issues with my code and i was wondering if you could help me out. currently what i've done is take an xml document returned from a server, put it into a string, and then select specific lines from that string, from which i will extract numbers. here's the string
    <?xml version="1.0"?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:census1="tag:govshare.info,2005:rdf/census/details/100pct/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:census="http://www.rdfabout.com/rdf/schema/census/">
        <rdf:Description rdf:about="http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90041/censustables">
            <census1:totalPopulation>
                <rdf:Description>
                    <dc:title>SEX BY AGE (P012001)</dc:title>
                    <census1:female>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1131</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">327</census1:_62To64Years>
                            <census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">875</census1:_10To14Years>
                            <census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">864</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">592</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">307</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">689</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">600</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">450</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">331</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">932</census1:_25To29Years>
                            <census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">534</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1035</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">14540</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">970</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1038</census1:_45To49Years>
                            <census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">949</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">261</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">264</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">482</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">208</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1026</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">285</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">390</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:female>
                    <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">27864</rdf:value>
                    <census1:male>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1077</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</census1:_62To64Years>
                            <census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">872</census1:_10To14Years>
                            <census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">862</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">511</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">258</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">647</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">569</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">252</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">183</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">969</census1:_25To29Years>
                            <census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">525</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1024</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">13324</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">822</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">987</census1:_45To49Years>
                            <census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">974</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">215</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">287</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">320</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">155</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1140</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">257</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">148</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:male>
                </rdf:Description>
            </census1:totalPopulation>
        </rdf:Description>
    </rdf:RDF>now my first attempt at pulling this off worked just fine, but only for the female demographics, since the tags for female and male are identical (only the numbers/data is different) and my parser would stop after reaching the first round of tags specified.
    here's part of my code for that section, located in the main (response is the xml string returned from server):
    while ((temp = in.readLine()) != null)
                 response += temp + "\n";
            temp = null;
            in.close ();
    int left = response.indexOf("<census1:under5Years rdf:datatype=\"http://www.w3.org/2001/XMLSchema#integer\">");
              int right = response.indexOf("</census1:under5Years>");
                   // pull out the text inside the parens
                   String parsed = response.substring(left+77, right);
                   double parseddub = Double.parseDouble(parsed);
                        //divide the group Under5Years into Under12Mo and 1to4Yr
                        double Group1Adub = parseddub*.25;//25% for Under12Mo
                        Group1Adub = Math.ceil(Group1Adub);
                        int Group1A =(int)Group1Adub;
                        double Group1Bdub = parseddub*.75;//75% for 1to4Yr
                        Group1Bdub = Math.ceil(Group1Bdub);
                        int Group1B =(int)Group1Bdub;
    //..need to basically duplicate this for 3 other age groups
    int Group1 = Group1A;
    System.out.println("Server response:\n" + "Female");
              System.out.println("Under 12 Months:    " + Group1);now basically, everything works great for the female data, but i would like to somehow loop this or selectively parse by line and then extract information from those selected lines. any thoughts? i would really appreciate some insight thanks.

    lol no offense taken. sorry for the confusion, please disregard my earlier statements... :)
    i actually was able to get the thing working, i just didn't quite understand what i was doing at first.
    however, i noticed that the regex only handles the first four lines of each group (male and female). i was wondering if there was a way to do it that's non-sequential?
    <?xml version="1.0"?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:census1="tag:govshare.info,2005:rdf/census/details/100pct/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:census="http://www.rdfabout.com/rdf/schema/census/">
        <rdf:Description rdf:about="http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90041/censustables">
            <census1:totalPopulation>
                <rdf:Description>
                    <dc:title>SEX BY AGE (P012001)</dc:title>
                    <census1:female>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1131</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">327</census1:_62To64Years>
                           -<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">875</census1:_10To14Years>
                           -<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">864</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">592</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">307</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">689</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">600</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">450</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">331</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">932</census1:_25To29Years>
                           -<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">534</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1035</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">14540</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">970</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1038</census1:_45To49Years>
                           -<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">949</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">261</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">264</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">482</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">208</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1026</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">285</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">390</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:female>
                    <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">27864</rdf:value>
                    <census1:male>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1077</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</census1:_62To64Years>
                           -<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">872</census1:_10To14Years>
                           -<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">862</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">511</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">258</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">647</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">569</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">252</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">183</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">969</census1:_25To29Years>
                           -<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">525</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1024</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">13324</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">822</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">987</census1:_45To49Years>
                           -<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">974</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">215</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">287</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">320</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">155</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1140</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">257</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">148</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:male>
                </rdf:Description>
            </census1:totalPopulation>
        </rdf:Description>
    </rdf:RDF> using the regular expression, i can parse the string, but what i really need is to only parse the 8 lines designated, and they are not in sequential order, which makes it somewhat problematic.
    the format of the output i want to get should be as in the following example (female: under5, 5to9, 10to14, 15to17):
    [864, 949, 875, 534]
    same format for male of course. i'm just not sure how to edit the regex so that it can select only the lines i'm concerned with...? thanks so much i really appreciate this.

  • How to parse html for and display hyperlinks?

    I'm trying to design a report that has a text field that contains html formatted text and includes links. These links need to be clickable in a thick client Java application I'm developing and the only way I can see in Crystal Developer to make a clickable link is to have a discrete text element with a hyperlink (set using the hyperlink tab in the element properties) for each link.
    The problem I have is that there can be any number of links in the html and I need a scalable way to extract and display these links.
    So far I have used formulas in Crystal Developer to parse the html and extracte the links into a fixed size array and then display each link in a separate text element. I would like to be able to have only one 'link' text element in the report design and create as many link elements as required depending on how many links are present in the html.
    How is this possible? With some funky grouping voodoo maybe, or something else? Please help me achieve this.
    Cheers,
    Elliot.

    Hi Elliot,
    Follow these steps, and check the output.
    1.Right click on the field object and select "Format Editor".
    2.Click on the "Paragraph" tab and select the "Text interpretation" as "RTF Text" or "HTML Text".
    3.Click on "Ok" button.
    Hope this helps.

  • How to select line items in recording(BDC)

    Hi All,
    we are trying to Recording QP02 transaction ,we have inputs like material,plant,Group,Group Counter.
    after entering these inputs we will get multiful line items(inspection characteristics).we need to check one field for each item.
    How can we get this?
    Please help me?
    Thanks,
    Peddi reddy.

    Hi Kamesh,
    Thanks.
    After selecting line items i am selecting control indicators Tab.
    then Pop up screen called as (Edit characteristic control indicators) will open ,..then just pressing enter..the it will show another pop up ..here i am selecting one field(Long term Inspection)..the process has to do for all line items.
    In My program i have copied BDC performs which i got from Recording.
    Do i need to change tha performs or will it work?
    i tested in foreground with another material .... upto 3 or 4 line items its working fine.after that sytem does.t say anything.
    if i need to chage performs please help me .

  • How to use at-line selection in ALV

    Can someone help me about how to use at-line selection in an ALV

    u can try in user_command
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
             I_CALLBACK_PROGRAM = G_REPID
             IT_FIELDCAT = GT_FIELDCATALOG
             I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'
             I_CALLBACK_HTML_END_OF_LIST = G_HTML_END_OF_LIST
             I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
             I_GRID_SETTINGS = GS_SETTINGS
             IS_LAYOUT = GS_LAYOUT
             I_SAVE = G_SAVE
             IS_VARIANT = GS_VARIANT
             IT_EVENTS = GT_EVENTS[]
    *      I_SCREEN_START_COLUMN = 0 "Use coordinates for
    *      I_SCREEN_START_LINE = 0 "display as dialog box
    *      I_SCREEN_END_COLUMN = 0
    *      I_SCREEN_END_LINE = 0
        IMPORTING
             E_EXIT_CAUSED_BY_CALLER = G_EXIT_CAUSED_BY_CALLER
             ES_EXIT_CAUSED_BY_USER = GS_EXIT_CAUSED_BY_USER
        TABLES
             T_OUTTAB = I_REP
        EXCEPTIONS
             PROGRAM_ERROR = 1
             OTHERS = 2.
    FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
                            RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
        WHEN '&IC1'.
          CASE RS_SELFIELD-FIELDNAME.
            WHEN 'XXXXX'.
              READ TABLE I_xxx INTO V_xxx
                WITH KEY XXX = RS_SELFIELD-VALUE.
              IF SY-SUBRC = 0.
              ENDIF.
            WHEN OTHERS
          ENDCASE.
      ENDCASE.
    ENDFORM.

  • Itunes - how do i select multiple line items not in sequence ?

    itunes - how do i select multiple line items not in sequence ?

    Hold down the Command key and click each in succession.
    To extend the selection across items that ARE contiguous, use the Shift key.

  • How to Create Test Sequence Document in HTML using command line

    How to Create Test Sequence Document  in HTML using command line
    I have lot of sequences and I want to create Test Sequence Documentation in HTML format using Command Line automatically, is there a way to automate this task using .bat file or using   C#  .Net

    If you aren't able to figure out how to call a C++ DLL in .net then there may be another option.  Unfortunately I don't know how to do this off the top of my head and I don't have an example.
    The other option would be to change docgen.seq a little bit to the dialog doesn't display and you just hardcode the options.  Then you can use a command line to call testexec.exe: http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/startup_opt/
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How to Parse an HTML File?

    Hi all
    I want to parse an HTML file?
    How is it possible?
    After taking an input which is an HTML file, i need to parse it, and i need to print/modify values based on some tags?
    Please help me, how to parse an HTML file?

    You start by reading the first character and then continiung until you reach the last character.
    For a more serious answer try elaborating on your question. Its really really vague.

Maybe you are looking for

  • Error 11556 when trying to log in to Itunes Store

    When I try to log in to the Itunes store I get the error message 11556. Version OS: Mac OS X 10.7.1 Version Itunes: 10.4.1 Also when (whithout being signed in) I can not go to th movie, music, tv, etc... sections in Itunes. How can I solve this? Thij

  • Copying a Huge iPAD3 video to Windows

    I have recently recorded a Video Clip using my New iPad 3 . The video size is quite huge size around 9GB I guess. When I connect the iPAd to Laptop(HP) this video is not shown in the list . Any reason why I will not be able to copy. Is there a size l

  • How do you change your intial bc template selection under site options after you click finish

    how do you change your intial bc template selection under site options after you click finish

  • Can´t start After Effects

    Hi, if I try to start After Effects (I have the Student & Teacher Cloud) I got a Systemerror, that "LogSession.dll" would be missing, and I had to install it again. But by using die Apllication Manager, I can´t install it. Can anybody tell me, where

  • AEBS with an External Harddrive as a FTP Server

    Sorry if this has been answered already so fill free to point me in the right direction if so. Here is what I'd like to do; I currently have a WD harddrive plugged in to my AEBS, I'd like to use the harddrive as a FTP server for various reasons. I'd