JSON are not show in mobile app using angularjs - json

This data are show in the web browser but not in the mobile app
i already check the internet connection in mobile but cant't get it any answer
This is my code
<!DOCTYPE html>
<html>
<head>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
</head>
<body>
<div ng-app="" ng-controller="customersController">
<ul>
<li ng-repeat="x in names">
{{ x.Name + ', ' + x.Country }}
</li>
</ul>
</div>
<script>
function customersController($scope,$http) {
$http.get("http://www.w3schools.com//website/Customers_JSON.php")
.success(function(response) {$scope.names = response;});
}
</script>
</body>
</html>
But my mobile is show me this output ->
{{ x.Name + ', ' + x.Country }}
but my web browser show me the correct answer
Alfreds Futterkiste, Germany
Berglunds snabbköp, Sweden
Centro comercial Moctezuma, Mexico
Ernst Handel, Austria
FISSA Fabrica Inter. Salchichas S.A., Spain
Galería del gastrónomo, Spain
Island Trading, UK
Königlich Essen, Germany
Laughing Bacchus Wine Cellars, Canada
Magazzini Alimentari Riuniti, Italy
North/South, UK
Paris spécialités, France
Rattlesnake Canyon Grocery, USA
Simons bistro, Denmark
The Big Cheese, USA
Vaffeljernet, Denmark
Wolski Zajazd, Poland
In this case what can i do for mobile app

Related

How to scrape a table from a webpage and exclude specific tables neseted inside tables<td> tag

I wish to scrape a table from a specific webpage. The issue is that some of the table's td contains a nested span tag containing another nested table.
The webpage that I want to scrape from is the following Click here .
I have included a small sample of the table that I want to scrape with the nested table contained within span tag with a class tooltip-icon. How can I exclude the contents inside these specific span tags when scraping the whole table
<tr style="font-size:12px;">
<td align="left">Abhanpur</td>
<td align="center">53</td>
<td align="left">
<table>
<tbody>
<tr>
<td>DHANENDRA SAHU</td>
<td style="vertical-align:top"><span class="tooltip-icon" style="display:block">i</span>
<div class="tooltip">
<h3>Assembly Election Result 2013</h3>
<table>
<tbody>
<tr>
<td>Party</td>
<td>:</td>
<td>Indian National Congress</td>
</tr>
<tr>
<td>Result</td>
<td>:</td>
<td>WON</td>
</tr>
<tr>
<td>Margin</td>
<td>:</td>
<td>8354</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</td>
<td align="left">
<table>
<tbody>
<tr>
<td>Indian National Congress</td>
<td style="vertical-align:top"><span class="tooltip-icon" style="display:block">i</span>
<div class="tooltip">
<h3>Current Assembly Election Result</h3>
<table>
<tbody>
<tr>
<td>Leading In</td>
<td>:</td>
<td>0</td>
</tr>
<tr>
<td>Won In</td>
<td>:</td>
<td>68</td>
</tr>
<tr>
<td>Trailing In</td>
<td>:</td>
<td>0</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</td>
<td align="left">CHANDRASHEKHAR SAHU - CHAMPU BHAIYYA</td>
<td align="left">
<table>
<tbody>
<tr>
<td>Bharatiya Janata Party</td>
<td style="vertical-align:top"><span class="tooltip-icon" style="display:block">i</span>
<div class="tooltip">
<h3>Current Assembly Election Result</h3>
<table>
<tbody>
<tr>
<td>Leading In</td>
<td>:</td>
<td>0</td>
</tr>
<tr>
<td>Won In</td>
<td>:</td>
<td>15</td>
</tr>
<tr>
<td>Trailing In</td>
<td>:</td>
<td>0</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</td>
<td align="right">23471 </td>
<td align="center">Result Declared</td>
<td align="center" style="background-color: lightgray;">DHANENDRA SAHU</td>
<td align="center" style="background-color: lightgray;">Indian National Congress</td>
<td align="center" style="background-color: lightgray;">8354</td>
I am also including the full python script I currently use to scrape the table. I have successfully scrape the whole table but unable to exclude the nested span and table content.
full scraper code here
The Out put that I am currently getting in a csv format is as follows (Just the sample row out of the whole set). In the 3rd column the span tag also gets scraped as indicated by "iAssembly Election Result"
Abhanpur,53,DHANENDRA SAHUiAssembly Election Result 2013Party:Indian National CongressResult:WONMargin:8354,DHANENDRA SAHU,iAssembly Election Result 2013Party:Indian National CongressResult:WONMargin:8354,Party,:,Indian National Congress,Result,:,WON,Margin,:,8354,Indian National CongressiCurrent Assembly Election ResultLeading In:0Won In:68Trailing In:0,Indian National Congress,iCurrent Assembly Election ResultLeading In:0Won In:68Trailing In:0,Leading In,:,0,Won In,:,68,Trailing In,:,0,CHANDRASHEKHAR SAHU - CHAMPU BHAIYYA,Bharatiya Janata PartyiCurrent Assembly Election ResultLeading In:0Won In:15Trailing In:0,Bharatiya Janata Party,iCurrent Assembly Election ResultLeading In:0Won In:15Trailing In:0,Leading In,:,0,Won In,:,15,Trailing In,:,0,23471 ,Result Declared,DHANENDRA SAHU,Indian National Congress,8354,
The expected out put is to scrape the table excluding the span tags and its nested tables. for example
Abhanpur, 53 , DHANENDRA SAHU, Indian National Congress, CHANDRASHEKHAR SAHU - CHAMPU BHAIYYA, Bharatiya Janata Party , 23471, Result Declared
Any help on this would be very helpful. thanks.
This is just my preference, but whenever I see <table> tags, I utilise Pandas to do the parsing, then just manipulate the dataframe as needed. It also allows you to write to file in one line:
import pandas as pd
results_df = pd.DataFrame()
url_list = [1,2,3,4,5,6,7,8]
url = 'http://eciresults.nic.in/Statewises26.htm'
dfs = pd.read_html(url)
df = dfs[0]
idx = df[df[0] == '1\xa02\xa03\xa04\xa05\xa06\xa07\xa08\xa09\xa0Next >>'].index[0]
cols = list(df.iloc[idx-1,:])
df.columns = cols
df = df[df['Const. No.'].notnull()]
df = df.loc[df['Const. No.'].str.isdigit()].reset_index(drop=True)
df = df.dropna(axis=1,how='all')
df['Leading Candidate'] = df['Leading Candidate'].str.split('i',expand=True)[0]
df['Leading Party'] = df['Leading Party'].str.split('iCurrent',expand=True)[0]
df['Trailing Party'] = df['Trailing Party'].str.split('iCurrent',expand=True)[0]
df['Trailing Candidate'] = df['Trailing Candidate'].str.split('iAssembly',expand=True)[0]
results_df = results_df.append(df)
for x in url_list:
url = 'http://eciresults.nic.in/Statewises26%s.htm' %x
print ('Processed %s' %url)
dfs = pd.read_html(url)
df = dfs[0]
df.columns = cols
df = df[df['Const. No.'].notnull()]
df = df.loc[df['Const. No.'].str.isdigit()].reset_index(drop=True)
df = df.dropna(axis=1,how='all')
df['Leading Candidate'] = df['Leading Candidate'].str.split('i',expand=True)[0]
df['Leading Party'] = df['Leading Party'].str.split('iCurrent',expand=True)[0]
df['Trailing Party'] = df['Trailing Party'].str.split('iCurrent',expand=True)[0]
df['Trailing Candidate'] = df['Trailing Candidate'].str.split('iAssembly',expand=True)[0]
results_df = results_df.append(df).reset_index(drop=True)
results_df.to_csv('Chhattisgarh_cand.csv', index=False)
Output:
print (df.to_string())
Constituency Const. No. Leading Candidate Leading Party Trailing Candidate Trailing Party Margin Status Winning Candidate Winning Party Margin
0 Abhanpur 53 DHANENDRA SAHU Indian National Congress CHANDRASHEKHAR SAHU - CHAMPU BHAIYYA Bharatiya Janata Party 23471 Result Declared DHANENDRA SAHU Indian National Congress 8354
1 Ahiwara 67 GURU RUDRA KUMAR Indian National Congress RAJMAHANT SANWLA RAM DAHRE Bharatiya Janata Party 31687 Result Declared RAJMAHNT SANWLA RAM DAHRE Bharatiya Janata Party 31676
2 Akaltara 33 SAURABH SINGH Bharatiya Janata Party RICHA JOGI Bahujan Samaj Party 1854 Result Declared CHUNNILAL SAHU Indian National Congress 21693
3 Ambikapur 10 T.S. BABA Indian National Congress ANURAG SINGH DEO Bharatiya Janata Party 39624 Result Declared T.S.BABA Indian National Congress 19558
4 Antagarh 79 ANOOP NAG Indian National Congress VIKRAM USENDI Bharatiya Janata Party 13414 Result Declared VIKRAM USENDI Bharatiya Janata Party 5171
5 Arang 52 DR. SHIVKUMAR DAHARIYA Indian National Congress SANJAY DHIDHI Bharatiya Janata Party 25077 Result Declared NAVEEN MARKANDEY Bharatiya Janata Party 13774
6 Baikunthpur 3 AMBICA SINGH DEO Indian National Congress BHAIYALAL RAJWADE Bharatiya Janata Party 5339 Result Declared BHAIYALAL RAJWADE Bharatiya Janata Party 1069
7 Balodabazar 45 PRAMOD KUMAR SHARMA Janta Congress Chhattisgarh (J) JANAK RAM VERMA Indian National Congress 2129 Result Declared JANAK RAM VERMA Indian National Congress 9977
8 Basna 40 DEVENDRA BAHADUR SINGH Indian National Congress SAMPAT AGRAWAL Independent 17508 Result Declared RUPKUMARI CHOUDHARY Bharatiya Janata Party 6239
9 Bastar 85 BAGHEL LAKHESHWAR Indian National Congress DR. SUBHAU KASHYAP Bharatiya Janata Party 33471 Result Declared BAGHEL LAKHESHWAR Indian National Congress 19168
You can do it with pandas, using this:
import pandas as pd
page = pd.read_html('http://eciresults.nic.in/Statewises26.htm')
my_table = page[5]
That gets you a pandas dataframe containing the table you're interested in, I believe. If you try:
my_table.iloc[[7]]
The output is:
7 Abhanpur 53 DHANENDRA SAHUiAssembly Election Result 2013Pa... Indian National CongressiCurrent Assembly Elec... CHANDRASHEKHAR SAHU - CHAMPU BHAIYYA Bharatiya Janata PartyiCurrent Assembly Electi... 23471 Result Declared DHANENDRA SAHU Indian National Congress 8354 NaN NaN
If that's what you are after, you can clean up your table using standard pandas methods.

BeautifulSoup4 and HTML

I want to extract from the following html code, the following information using python and bs4;
h2 class placename value,
span class value,
div class="aithousaspec" value
<div class="results-list">
<div class="piatsaname">city center</div>
<table>
<tr class="trspacer-up">
<td>
<a href="hall.aspx?id=1001173">
<h2 class="placename">ARENA
<span class="boldelement"><img src="/images/sun.png" height="16" valign="bottom" style="padding:0px 3px 0px 10px" >Θερινός<br>
25 Richmond Avenue st, Leeds</span>
</h2>
<p>
+4497XXXXXXX<br>
STEREO SOUND
</p>
Every Monday 2 tickets 8,00 pounds
</a>
</td>
</tr>
<tr class="trspacer-down">
<td>
<p class="coloredelement">Italian Job</p>
<div class="aithousaspec">
<b></b> Thu.-Wed.: 20.50/ 23.00
<b></b>
</div>
The code that i m using doesnt seem efficient
# parse the html using beautiful soup and store in variable `soup`
soup = BeautifulSoup(page, 'html.parser')
print(soup.prettify())
mydivs = soup.select('div.results-list')
for info in mydivs:
time= info.select('div.aithousaspec')
print time
listCinemas = info.select("a[href*=hall.aspx]")
print listCinemas
print len(listCinemas)
for times in time:
proj= times.find('div.aithousaspec')
print proj
for names in listCinemas:
theater = names.find('h2', class_='placename')
print(names.find('h2').find(text=True).strip())
print (names.find('h2').contents[1].text.strip())
Is there any better way to get the mentioned info?
data = '''<div class="results-list">
<div class="piatsaname">city center</div>
<table>
<tr class="trspacer-up">
<td>
<a href="hall.aspx?id=1001173">
<h2 class="placename">ARENA
<span class="boldelement"><img src="/images/sun.png" height="16" valign="bottom" style="padding:0px 3px 0px 10px" >Θερινός<br>
25 Richmond Avenue st, Leeds</span>
</h2>
<p>
+4497XXXXXXX<br>
STEREO SOUND
</p>
Every Monday 2 tickets 8,00 pounds
</a>
</td>
</tr>
<tr class="trspacer-down">
<td>
<p class="coloredelement">Italian Job</p>
<div class="aithousaspec">
<b></b> Thu.-Wed.: 20.50/ 23.00
<b></b>
</div>'''
from bs4 import BeautifulSoup
import re
soup = BeautifulSoup(data, 'lxml')
print(soup.select('h2.placename')[0].contents[0].strip())
print(re.sub(r'\s{2,}', ' ', soup.select('span.boldelement')[0].text.strip()))
print(soup.select('div.aithousaspec')[0].text.strip())
This will print:
ARENA
Θερινός 25 Richmond Avenue st, Leeds
Thu.-Wed.: 20.50/ 23.00

'Active' not appearing during scrolling in bootstrap

I am trying to create a vertical scrollspy for a body of text. I have applied all the necessary tags and marked them with classes. I have applied the changes from here.
This is my code https://jsfiddle.net/DTcHh/23737
<div class="container">
<h1>Where's the plag?</h1>
<div class="jumbotron">
<small>
<p>Atom Type: paragraph </p>
<p>Cluster Method: kmeans </p>
<p>k: 2 </p>
Stylistic Feature(s):
<p>honore_r_measure </p>
<p></p>
</small>
<br>
<!--<div id='chart-container'></div>-->
</br>
<br>
</br>
<button type="button" class="btn btn-primary btn-sm" data-toggle="collapse" data-target="#full_table">
Hide/Show Table
</button>
<div class="row collapse in" id="full_table">
<div class="col-md-9">
<div class="table-responsive" style="font-size:12px;">
<table class="table table-condensed table-scrollable table-bordered">
<thead>
<tr>
<th>Start Index</th>
<th>honore_r_measure</th>
<th>Suspicion Score</th>
</tr>
</thead>
<tbody>
<tr class="passage_starting_at_">
<td class="passage_row"> 0</td>
<td class="passage_row"> 2831.7247</td>
<td class="passage_row" bgcolor=#F60C0C> 0.9108</td>
</tr>
<tr class="passage_starting_at_">
<td class="passage_row"> 264</td>
<td class="passage_row"> 1799.9239</td>
<td class="passage_row">0.0288</td>
</tr>
<tr class="passage_starting_at_">
<td class="passage_row"> 720</td>
<td class="passage_row"> 1585.1819</td>
<td class="passage_row">0.1407</td>
</tr>
<tr class="passage_starting_at_">
<td class="passage_row"> 1470</td>
<td class="passage_row"> 2785.1247</td>
<td class="passage_row" bgcolor=#F60C0C> 0.9466</td>
</tr>
<tr class="passage_starting_at_">
<td class="passage_row"> 1850</td>
<td class="passage_row"> 1762.0442</td>
<td class="passage_row">0.0106</td>
</tr>
<tr class="passage_starting_at_">
<td class="passage_row"> 2057</td>
<td class="passage_row"> 1942.3584</td>
<td class="passage_row">0.1779</td>
</tr>
<tr class="passage_starting_at_">
<td class="passage_row"> 3189</td>
<td class="passage_row"> 2567.0830</td>
<td class="passage_row">0.8316</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3"><div id="boxplot"></div></div>
<div class="col-md-9"><div class="panel-heading">
rowling_and_dickens
</div>
<div style="height: 700px;overflow-y: scroll;" class="panel-body col-md-9" id="document_content">
<p>
<div class="passage" features="<p>Span</p><p>0, 262</p><hr size = "10"<p>Plag. conf.</p><p>0.910800725896</p><hr size = "10"<p>PLAG SPAN</p><p>No plag!</p><hr size = "10"<p>honore_r_measure</p><p>2831.7247</p><hr size = "10""
style="font-size:14px;display:inline;color:rgb(255,0,0);" id='pass0'>
Mr. and Mrs. Dursley, of number four, Privet Drive, were proud to say
that they were perfectly normal, thank you very much. They were the last
people you'd expect to be involved in anything strange or mysterious,
because they just didn't hold with such nonsense.
</div>
<br/>
<div class="passage" features="<p>Span</p><p>264, 718</p><hr size = "10"<p>Plag. conf.</p><p>0.0288266743586</p><hr size = "10"<p>PLAG SPAN</p><p>No plag!</p><hr size = "10"<p>honore_r_measure</p><p>1799.9239</p><hr size = "10""
style="font-size:14px;display:inline;;color:rgb(0,0,0);" id='pass1'>
Mr. Dursley was the director of a firm called Grunnings, which made
drills. He was a big, beefy man with hardly any neck, although he did
have a very large mustache. Mrs. Dursley was thin and blonde and had
nearly twice the usual amount of neck, which came in very useful as she
spent so much of her time craning over garden fences, spying on the
neighbors. The Dursleys had a small son called Dudley and in their
opinion there was no finer boy anywhere.
</div>
<br/>
<div class="passage" features="<p>Span</p><p>720, 1468</p><hr size = "10"<p>Plag. conf.</p><p>0.1407492634</p><hr size = "10"<p>PLAG SPAN</p><p>No plag!</p><hr size = "10"<p>honore_r_measure</p><p>1585.1819</p><hr size = "10""
style="font-size:14px;display:inline;;color:rgb(0,0,0);" id='pass2'>
The Dursleys had everything they wanted, but they also had a secret, and
their greatest fear was that somebody would discover it. They didn't
think they could bear it if anyone found out about the Potters. Mrs.
Potter was Mrs. Dursley's sister, but they hadn't met for several years;
in fact, Mrs. Dursley pretended she didn't have a sister, because her
sister and her good-for-nothing husband were as unDursleyish as it was
possible to be. The Dursleys shuddered to think what the neighbors would
say if the Potters arrived in the street. The Dursleys knew that the
Potters had a small son, too, but they had never even seen him. This boy
was another good reason for keeping the Potters away; they didn't want
Dudley mixing with a child like that.
</div>
<br/>
<div class="passage" features="<p>Span</p><p>1470, 1847</p><hr size = "10"<p>Plag. conf.</p><p>0.946586144898</p><hr size = "10"<p>PLAG SPAN</p><p>No plag!</p><hr size = "10"<p>honore_r_measure</p><p>2785.1247</p><hr size = "10""
style="font-size:14px;display:inline;color:rgb(255,0,0);" id='pass3'>
When Mr. and Mrs. Dursley woke up on the dull, gray Tuesday our story
starts, there was nothing about the cloudy sky outside to suggest that
strange and mysterious things would soon be happening all over the
country. Mr. Dursley hummed as he picked out his most boring tie for
work, and Mrs. Dursley gossiped away happily as she wrestled a screaming
Dudley into his high chair.
</div>
<br/>
<div class="passage" features="<p>Span</p><p>1850, 2055</p><hr size = "10"<p>Plag. conf.</p><p>0.0105840400639</p><hr size = "10"<p>PLAG SPAN</p><p>No plag!</p><hr size = "10"<p>honore_r_measure</p><p>1762.0442</p><hr size = "10""
style="font-size:14px;display:inline;;color:rgb(0,0,0);" id='pass4'>
My father's family name being Pirrip, and my Christian name Philip, my infant
tongue could make of both names nothing longer or more explicit than Pip. So, I
called myself Pip, and came to be called Pip.
</div>
<br/>
<div class="passage" features="<p>Span</p><p>2057, 3187</p><hr size = "10"<p>Plag. conf.</p><p>0.177879051884</p><hr size = "10"<p>PLAG SPAN</p><p>No plag!</p><hr size = "10"<p>honore_r_measure</p><p>1942.3584</p><hr size = "10""
style="font-size:14px;display:inline;;color:rgb(0,0,0);" id='pass5'>
I give Pirrip as my father's family name, on the authority of his tombstone and my
sister - Mrs. Joe Gargery, who married the blacksmith. As I never saw my father or
my mother, and never saw any likeness of either of them (for their days were long
before the days of photographs), my first fancies regarding what they were like,
were unreasonably derived from their tombstones. The shape of the letters on my
father's, gave me an odd idea that he was a square, stout, dark man, with curly
black hair. From the character and turn of the inscription, "Also Georgiana Wife of
the Above," I drew a childish conclusion that my mother was freckled and sickly. To
five little stone lozenges, each about a foot and a half long, which were arranged
in a neat row beside their grave, and were sacred to the memory of five little
brothers of mine - who gave up trying to get a living, exceedingly early in that
universal struggle - I am indebted for a belief I religiously entertained that they
had all been born on their backs with their hands in their trousers-pockets, and
had never taken them out in this state of existence.
</div>
<br/>
<div class="passage" features="<p>Span</p><p>3189, 4158</p><hr size = "10"<p>Plag. conf.</p><p>0.831630019231</p><hr size = "10"<p>PLAG SPAN</p><p>No plag!</p><hr size = "10"<p>honore_r_measure</p><p>2567.0830</p><hr size = "10""
style="font-size:14px;display:inline;;color:rgb(0,0,0);" id='pass6'>
Ours was the marsh country, down by the river, within, as the river wound, twenty
miles of the sea. My first most vivid and broad impression of the identity of
things, seems to me to have been gained on a memorable raw afternoon towards
evening. At such a time I found out for certain, that this bleak place overgrown
with nettles was the churchyard; and that Philip Pirrip, late of this parish, and
also Georgiana wife of the above, were dead and buried; and that Alexander,
Bartholomew, Abraham, Tobias, and Roger, infant children of the aforesaid, were
also dead and buried; and that the dark flat wilderness beyond the churchyard,
intersected with dykes and mounds and gates, with scattered cattle feeding on it,
was the marshes; and that the low leaden line beyond, was the river; and that the
distant savage lair from which the wind was rushing, was the sea; and that the
small bundle of shivers growing afraid of it all and beginning to cry, was Pip.
</div>
</div>
<nav class="col-sm-3" id="myScrollspy">
<ul class="nav nav-pills nav-stacked">
<li class="active" ><a style="color:rgb(255,0,0);" href='#pass0'>pass0</a></li>
<li ><a style="color:rgb(0,0,0);" href='#pass1'>pass1</a></li>
<li ><a style="color:rgb(0,0,0);" href='#pass2'>pass2</a></li>
<li ><a style="color:rgb(255,0,0);" href='#pass3'>pass3</a></li>
<li ><a style="color:rgb(0,0,0);" href='#pass4'>pass4</a></li>
<li ><a style="color:rgb(0,0,0);" href='#pass5'>pass5</a></li>
<li ><a style="color:rgb(0,0,0);" href='#pass6'>pass6</a></li>
</ul>
</nav>
</div>
However, when I scroll through the text, the active section doesn't get highlighted other than the first.
Please tell me what is going wrong
Working in your jsfiddle, I updated to the latest Bootstrap and Jquery versions (this is not necessary), after that I found in the example the following tags on the <body> element were present: <body data-spy="scroll" data-target=".navbar" data-offset="50">. These attributes should be added to the scrollable area, the target is the navbar which handles the links. Following jsfiddle is working (edit of your code): https://jsfiddle.net/DTcHh/23739/
I added the attributes on the scrollarea and gave the <nav> the ClassName .mynav:
<div style="height: 700px;overflow-y: scroll;" class="panel-body col-md-9" id="document_content" data-spy="scroll" data-target=".mynav" data-offset="50">`

Embedding XML data in existing HTML/CSS template

I want to embed an XML file into an existing template I have been creating. My website contains a content header, content section, sidebar etc. But I want to embed the XML data into the content section, so that I can use my existing CSS and formatting without rewriting half of it in XSLT. I have already run across the "xml" tag, but I want to import it from an external file rather than inline.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="Local fish and chips bar, serving the city for over 20 years.">
<meta name="keywords" content="Food,Drink,Fish,Chips,British">
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
<div id="header">
<h1>
<img alt="logo" src="images\logo.jpg" style="width:473px;height:135px">Home</h1>
</div>
<div id = "wrap">
<div id = "navWrap">
<div id = "nav">
<ul>
<li><a class ="nav" href="index.html">Home</a></li>
<li><a class ="nav" href="order.html">Order Online</a></li>
<li><a class ="nav" href="look.html">Look Around</a></li>
<li><a class ="nav" href="contact.html">Contact Us</a></li>
<li><a class ="nav" href="#menu">Download Our Menu</a></li>
<li><a class ="nav" href="#contact">Download Our App</a></li>
<li><a class ="nav" href="report.html">Report</a></li>
</ul>
</div>
</div>
</div>
<div id="main">
<xml Id = msg SRC = "menu.xml"></xml> ----- **XML GOES HERE**
</div>
<div id="sidebar">
<div id = "sidebarMain">
</div>
<div id = "mapWrap">
<iframe src= width="400" height="300" frameborder="0" style="border:0"></iframe>
</div>
<h3><center><u>Opening Times</u></center></h3>
<table style="width:100%">
<tr>
<th>Day</th>
<th>Lunch</th>
<th>Evening</th>
</tr>
<tr>
<td>Monday</td>
<td>10:00 - 14:00</td>
<td>16:00 - 22:00</td>
</tr>
<tr>
<td>Tuesday</td>
<td>10:00 - 14:00</td>
<td>16:00 - 22:00</td>
</tr>
<tr>
<td>Wednesday</td>
<td>10:00 - 14:00</td>
<td>16:00 - 22:00</td>
</tr>
<tr>
<td>Thursday</td>
<td>10:00 - 14:00</td>
<td>16:00 - 22:00</td>
</tr>
<tr>
<td>Friday</td>
<td>10:00 - 14:00</td>
<td>15:00 - 23:00</td>
</tr>
<tr>
<td>Saturday</td>
<td>10:00 - 14:00</td>
<td>15:00 - 23:00</td>
</tr>
<tr>
<td>Sunday</td>
<td>Closed</td>
<td>Closed</td>
</tr>
</table>
</div>
<div id = "footer">
Copyright © FryingNemo.com<br>
<br>
</div>
</body>
</head>
My xml file:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="nemoMenu.xsl"?>
<breakfast_menu>
<food>
<name>Belgian Waffles</name>
<price>$5.95</price>
<description>Two of our famous Belgian Waffles with plenty of real maple syrup</description>
<calories>650</calories>
</food>
<food>
<name>Strawberry Belgian Waffles</name>
<price>$7.95</price>
<description>Light Belgian waffles covered with strawberries and whipped cream</description>
<calories>900</calories>
</food>
<food>
<name>Berry-Berry Belgian Waffles</name>
<price>$8.95</price>
<description>Light Belgian waffles covered with an assortment of fresh berries and whipped cream</description>
<calories>900</calories>
</food>
<food>
<name>French Toast</name>
<price>$4.50</price>
<description>Thick slices made from our homemade sourdough bread</description>
<calories>600</calories>
</food>
<food>
<name>Homestyle Breakfast</name>
<price>$6.95</price>
<description>Two eggs, bacon or sausage, toast, and our ever-popular hash browns</description>
<calories>950</calories>
</food>
</breakfast_menu>
Any resolution on the issue would be appreciated, or perhaps I would be better of simply using XSLT.
Neither HTML 4 nor HTML5 has an xml element, only older versions of IE on Windows supported that to embed so called XML data islands inline in HTML. So there is no other way to embed external XML documents in an HTML document other than there is to embed other content, namely the iframe element and the object element. That is as far as static HTML is concerned, of course if you have some server-side programming/processing framework or want to rely on client-side scripting, then there are other options.

Expected end ASP error

I am not sure how to fix the following error:
Microsoft VBScript compilation error '800a03f6'
Expected 'End'
/junk/test.asp, line 103
else
^
Relevant code:
<%
con.MoveNext()
Wend
%>
</table>
<% else %>
<p>No seminars available.</p>
<%
end if
con.close
%>
Whole code:
<%# LANGUAGE="VBSCRIPT" %>
<%
Dim connectString, connect, conDB, con, src_st
connectString = "Driver={Microsoft Text Driver (*.txt; *.csv)}; DBQ=" & Server.MapPath("data")
src_st = Request.QueryString("state")
set connect = Server.CreateObject("ADODB.connection")
connect.open connectString
if src_cat = "" then
conDB = "SELECT * FROM travel.csv"
else
conDB = "SELECT * FROM travel.csv where state = ' & src_st & '"
set con = connect.execute(conDB)
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Seminars & workshops - AvSafety Seminars</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" media="screen" href="/style/screen.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/style/avsafety.css" />
<link rel="stylesheet" type="text/css" media="handheld" href="/style/handheld.css" />
<link rel="stylesheet" type="text/css" media="print" href="/style/print.css" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<style type="text/css">
<!--
.style2 {color: #666666 }
-->
</style>
<!--
-->
</head>
<body>
<div id="printtitle">Civil Aviation Safety Authority</div>
<div id="outer_wrapper">
<div id="wrapper">
<div id="container">
<div id="title"><h1> </h1></div>
<img src="images/windsock.jpg" alt="" width="166" height="500" align="right" />
<div id="content">
<!--Start of main content area-->
<div id="right"> <img src="/wcmswr/_assets/main/seminars/images/AVSAFETY-LOGO.GIF" alt="AVSafety logo" border="0" width="250px" height="50px">
</div>
<h1>AvSafety Seminars</h1>
<p>CASA is continuing with the Safety Seminar program, targeting pilots in regional Australia and run in partnership with the local aviation industry. </p>
<p>We also hold seminars targeted at engineers.</p>
<p>View further information on safety issues and topics.</p>
<h2>Request a seminar</h2>
<p> If you would like to request an AvSafety seminar in your local town, use the AvSafety request from.</p>
<h2>2013 Seminar schedule</h2>
<p>In 2013 CASA ASAs will be focusing on visiting organisations to discuss the forthcoming aviation regulatory changes. They will be in all regions of Australia and individuals or organisations are welcome to contact their local region ASA to arrange an appointment time. The approximate travel schedule for each region is shown below. ASAs are available and active each month for visits within capital city environs (approximately within 2 hours driving of a capital city).</p>
<p>Aero clubs and other aviation organisation are welcome to run Aviation Safety Seminars with ASAs presenting topics, however CASA will not be financially supporting the events. If you would like to run a seminar with ASA attendance, please use the AvSafety request from and complete the details of the request. Every effort will be made to provide support however it will be advantageous to consider timings when an ASA is visiting a local region.
</p>
<p>ACT | NSW | QLD | SA | TAS | VIC | WA</p>
<table>
<tr>
<th>Location</th>
<th>State</th>
<th>Date</th>
</tr>
<% while (NOT con.EOF) %>
<tr>
<td><%=con("location")%></td>
<td><%=con("state")%></td>
<td><%=con("date")%></td>
</tr>
<%
con.MoveNext()
Wend
%>
</table>
<% else %>
<p>No seminars available.</p>
<%
end if
con.close
%>
<!--End of main content area-->
</div> <!-- content -->
</div> <!-- container -->
<div id="sidebar">
<h2 id = "sidebarhome">CASA home</h2>
<h2>Seminars & workshops</h2>
<ul>
<li>AvSafety Seminars </li>
<li> Maintenance seminars</li>
<li>Archerfield chief pilots</li>
<li>Competency Based Training Education</li>
<li>Manufacturing & certification workshop</li>
</ul>
<form action="http://agencysearch.australia.gov.au/search/search.cgi" name="agencysearch">
<input type="text" name="query" size="13" maxlength="50" value="" alt="Search field" />
<input type="hidden" name="collection" value="agencies" />
<input type="hidden" name="form" value="simple" />
<input type="hidden" name="profile" value="casa" />
<input type="submit" value="Search" name="Search" alt="Search button" />
</form>
</div>
<div class="clearing"> </div>
</div><!-- wrapper -->
</div> <!-- outer_wrapper -->
<div class="extras">
Contact CASA
</div>
<div class="footer">
Site help |
Copyright | Privacy
</div>
</body>
</html>
what if you change your code to this ?
<%
Dim connectString, connect, conDB, con, src_st
connectString = "Driver={Microsoft Text Driver (*.txt; *.csv)}; DBQ=" & Server.MapPath("data")
src_st = Request.QueryString("state")
set connect = Server.CreateObject("ADODB.connection")
connect.open connectString
if src_cat = "" then
conDB = "SELECT * FROM travel.csv"
else
conDB = "SELECT * FROM travel.csv where state = '" & src_st & "'"
end if
set con = connect.execute(conDB)
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Seminars & workshops - AvSafety Seminars</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" media="screen" href="/style/screen.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/style/avsafety.css" />
<link rel="stylesheet" type="text/css" media="handheld" href="/style/handheld.css" />
<link rel="stylesheet" type="text/css" media="print" href="/style/print.css" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<style type="text/css">
<!--
.style2 {color: #666666 }
-->
</style>
<!--
-->
</head>
<body>
<div id="printtitle">Civil Aviation Safety Authority</div>
<div id="outer_wrapper">
<div id="wrapper">
<div id="container">
<div id="title"><h1> </h1></div>
<img src="images/windsock.jpg" alt="" width="166" height="500" align="right" />
<div id="content">
<!--Start of main content area-->
<div id="right"> <img src="/wcmswr/_assets/main/seminars/images/AVSAFETY-LOGO.GIF" alt="AVSafety logo" border="0" width="250px" height="50px">
</div>
<h1>AvSafety Seminars</h1>
<p>CASA is continuing with the Safety Seminar program, targeting pilots in regional Australia and run in partnership with the local aviation industry. </p>
<p>We also hold seminars targeted at engineers.</p>
<p>View further information on safety issues and topics.</p>
<h2>Request a seminar</h2>
<p> If you would like to request an AvSafety seminar in your local town, use the AvSafety request from.</p>
<h2>2013 Seminar schedule</h2>
<p>In 2013 CASA ASAs will be focusing on visiting organisations to discuss the forthcoming aviation regulatory changes. They will be in all regions of Australia and individuals or organisations are welcome to contact their local region ASA to arrange an appointment time. The approximate travel schedule for each region is shown below. ASAs are available and active each month for visits within capital city environs (approximately within 2 hours driving of a capital city).</p>
<p>Aero clubs and other aviation organisation are welcome to run Aviation Safety Seminars with ASAs presenting topics, however CASA will not be financially supporting the events. If you would like to run a seminar with ASA attendance, please use the AvSafety request from and complete the details of the request. Every effort will be made to provide support however it will be advantageous to consider timings when an ASA is visiting a local region.
</p>
<p>ACT | NSW | QLD | SA | TAS | VIC | WA</p>
<table>
<tr>
<th>Location</th>
<th>State</th>
<th>Date</th>
</tr>
<%
if NOT con.eof then
while (NOT con.EOF) %>
<tr>
<td><%=con("location")%></td>
<td><%=con("state")%></td>
<td><%=con("date")%></td>
</tr>
<%
con.MoveNext()
Wend
%>
</table>
<% else %>
<p>No seminars available.</p>
<%
end if
con.close
%>
<!--End of main content area-->
</div> <!-- content -->
</div> <!-- container -->
<div id="sidebar">
<h2 id = "sidebarhome">CASA home</h2>
<h2>Seminars & workshops</h2>
<ul>
<li>AvSafety Seminars </li>
<li> Maintenance seminars</li>
<li>Archerfield chief pilots</li>
<li>Competency Based Training Education</li>
<li>Manufacturing & certification workshop</li>
</ul>
<form action="http://agencysearch.australia.gov.au/search/search.cgi" name="agencysearch">
<input type="text" name="query" size="13" maxlength="50" value="" alt="Search field" />
<input type="hidden" name="collection" value="agencies" />
<input type="hidden" name="form" value="simple" />
<input type="hidden" name="profile" value="casa" />
<input type="submit" value="Search" name="Search" alt="Search button" />
</form>
</div>
<div class="clearing"> </div>
</div><!-- wrapper -->
</div> <!-- outer_wrapper -->
<div class="extras">
Contact CASA
</div>
<div class="footer">
Site help |
Copyright | Privacy
</div>
</body>
</html>