Problem getting XML from external source

Karsten Kryger Hansen

Usenet Archive
Joined
Aug 5, 2003
Messages
1
Reaction score
0
Hi

I have a problem with getting XML to my HTML. The question may be quite simple, but I have strugled with it all day, so please help.

A newsprovider (with whom I have a deal) has the following XML on their homepage:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE nyheder SYSTEM "http://borsen.dk/homenews/xml/homenews.dtd"> <nyheder> <nyhed> <tid>19:57</tid> <overskrift><a href="http://www.somewhere.dk/todays-news/index?ids=53705">News 1</a></overskrift> </nyhed> <nyhed> <tid>19:27</tid> <overskrift><a href="http://www.somewhere.dk/todays-news/index?ids=53704">News 2</a></overskrift> </nyhed> </nyheder>

And the dtd-file contains the following:

<!ELEMENT nyheder (nyhed*)>
<!ELEMENT nyhed (tid,overskrift)>
<!ELEMENT tid (#PCDATA)>
<!ELEMENT a (#PCDATA)>
<!ELEMENT overskrift (a)>
<!ATTLIST a href CDATA #IMPLIED>

So now the question. I would like to include the above news (nyheder=news) on my page. I have tried with the following code, which displayes the time (tid=time), but not the content with the link (the 'Overskrift' tag).

<xml src="http://www.somewhere.dk/homenews/xml/homenews.xml" id="xmldso" async="false"> </xml>

<table datasrc="#xmldso" border="1">

<thead>
<th>Tid</th>
<th>Overskrift</th>
</thead>

<tr align="left">
<td><div datasrc="#xmldso" datafld="tid"></div></td>
<td><div datasrc="#xmldso" datafld="overskrift"></div>
</td>
</tr></table>

What am I doing wrong. Your help is much appreciated.

Regards,
Karsten, Denmark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,802
Members
249,594
Latest member
henrywalsh

Latest Threads

Top