SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: XML for Newbie
-
Mar 21, 2002, 12:13 #1
- Join Date
- Oct 2000
- Location
- Philadelphia, PA
- Posts
- 4,708
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
XML for Newbie
Got a quick question for all you XML gurus out there. Ive just started learning XML and have a fairly simple question. Let me show you my code first...
<html>
<body>
<xml
src="trident.xml"
id="xmldso"
async="false">
</xml>
<table datasrc="#xmldso" width="100%" border="1">
<thead>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Web Site Name</th>
<th>Description</th>
<th>URL</th>
<th>Date</th>
</thead>
<tr align="left">
<td><span datafld="ID"></span></td>
<td><span datafld="UserFirst"></span></td>
<td><span datafld="UserLast"></span></td>
<td><span datafld="websitename"></span></td>
<td><span datafld="description"></span></td>
<td><A HREF="<%=a%>"><span datafld="url"></span></A></td>
<td><span datafld="DATE"></span></td>
</tr>
</table>
</body>
</html>
Basically this works great! What I am trying to do is pull the url value from the XML page and place it into a variable. Can someone tell me how this is done. Thank you!"Does this napkin smell like chloroform?"
...now with SnapFoo!
My Blog | My Twitter | My Company | SitePoint Podcast
*** Matt Mullenweg on the SitePoint Podcast ***
-
Mar 24, 2002, 09:19 #2
I'm not clear here, do you want to get the variable in ASP?
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Mar 25, 2002, 07:57 #3
- Join Date
- Oct 2000
- Location
- Philadelphia, PA
- Posts
- 4,708
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Yeah. Basically just want to pull the value into a variable so I can manipulate it. Thanks
"Does this napkin smell like chloroform?"
...now with SnapFoo!
My Blog | My Twitter | My Company | SitePoint Podcast
*** Matt Mullenweg on the SitePoint Podcast ***
-
Mar 25, 2002, 10:41 #4
- Join Date
- Dec 2001
- Location
- erie, pa
- Posts
- 1,130
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
are you trying to do this serverside or clientside?
-
Mar 25, 2002, 10:43 #5
- Join Date
- Oct 2000
- Location
- Philadelphia, PA
- Posts
- 4,708
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
server side
"Does this napkin smell like chloroform?"
...now with SnapFoo!
My Blog | My Twitter | My Company | SitePoint Podcast
*** Matt Mullenweg on the SitePoint Podcast ***
-
Mar 25, 2002, 12:09 #6
- Join Date
- Dec 2001
- Location
- erie, pa
- Posts
- 1,130
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
i'm not sure if that would be the method that would do what you want to do, as the XML file that the HTML page is binding to is not doing any processing on the serverside, the variable "a" really has no meaning.
perhaps do it clientside with something like:
<td><A href="#" onClick="GoTo()"><span datafld="url"></span></A></td>
and then have a javascript function:
function GoTo() {
location.assign(event.srcElement.innerText)
}
or something like that.Last edited by crowdozer; Mar 25, 2002 at 12:13.
Bookmarks