Problem getting XML from external source

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Karsten Kryger Hansen

    #1

    Problem getting XML from external source

    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.d k/todays-news/index?ids[]=53705">News
    1</a></overskrift>
    </nyhed>
    <nyhed>
    <tid>19:27</tid>
    <overskrift>< a
    href="http://www.somewhere.d k/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.d k/homenews/xml/homenews.xml" id="xmldso"
    async="false">
    </xml>

    <table datasrc="#xmlds o" border="1">

    <thead>
    <th>Tid</th>
    <th>Overskrif t</th>
    </thead>

    <tr align="left">
    <td><div datasrc="#xmlds o" datafld="tid"></div></td>
    <td><div datasrc="#xmlds o" datafld="oversk rift"></div>
    </td>
    </tr></table>

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

    Regards,
    Karsten, Denmark


Working...