Results 1 to 2 of 2
- 11-29-2010, 12:24 AM #1
Member
- Join Date
- Nov 2010
- Posts
- 1
- Rep Power
- 0
parsing out some data.. from an HTML response
Hey folks,
I am building a web map based upon GeoServer (A java Web Feature Server)
I am able to query, and get response from my WFS but it sends me more than I want. Have a lookit.. all of that stuff is what comes back in the response.response.Text All I want is the "pic0081.jpg" at the very end of the response.responseText so I can use it for a variable value on my page..
Any help would be welcome...
Andy.
<html>
<head>
<title>Geoserver GetFeatureInfo output</title>
</head>
<style type="text/css">
table.featureInfo, table.featureInfo td, table.featureInfo th {
border:1px solid #ddd;
border-collapse:collapse;
margin:0;
padding:0;
font-size: 90%;
padding:.2em .1em;
}
table.featureInfo th {
padding:.2em .2em;
font-weight:bold;
background:#eee;
}
table.featureInfo td{
background:#fff;
}
table.featureInfo tr.odd td{
background:#eee;
}
table.featureInfo caption{
text-align:left;
font-size:100%;
font-weight:bold;
text-transform:uppercase;
padding:.2em .2em;
}
</style>
<body>
pic0081.jpg
</body>
</html>
- 11-29-2010, 02:00 AM #2
You can use indexOf to find the position of <body> and </body> in the document. Then you can subtract these and get everything between them, then remove whitespace to obtain the pic0081.jpg from the body.
Similar Threads
-
HTML FILE parsing.
By makpandian in forum New To JavaReplies: 8Last Post: 11-02-2010, 03:00 PM -
html web page parsing/scraping
By orchid in forum Advanced JavaReplies: 3Last Post: 10-21-2010, 01:34 PM -
parsing and updating html file using JSP.
By tskarthic in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 04-02-2009, 09:12 PM -
Parsing HTML
By jaadu25 in forum Advanced JavaReplies: 6Last Post: 07-20-2008, 06:51 PM -
jeditorpane help parsing html
By asifsolkar in forum Advanced JavaReplies: 4Last Post: 12-14-2007, 05:23 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks