Hi,
Sorry for late response... If will be difficult to parse html by converting them into array like that and then re-parse for the xml writter script.
What we need to do is use a dom html parser..download this file from sourceforge and test it with simple html first..,
follow this instruction here..
for example, if we have a simple html document like this
<html>
<head>
<title>this is going to be parsed</title>
</head>
<body>
<table>
<tr>
<td>address 1</td>
<td>address 2</td>
<td>address 3</td>
</tr>
</table>
</body>
The sample PHP for the parser can be like this..
include_once 'lOCATION_OF_SIMPLE_HTML_DOM_CLASS';
$html = file_get_html('htmllocation');
function parse_this($html){
$td_data = array();
foreach($html->find('tr') as $row){
foreach($row->find('td') as $item){
$td_data[] = $item;
}
}
## address 1 to 3 are in this array
return $$td_data;
}
## test it
print_r (parse_this($html));
Let me know if you successfully print out the array as shown in my example... Once you got it working, it will be so easy to generate an xml file..