Forum Moderators: open

Message Too Old, No Replies

Hyperlink and tree question

XML newbie with questions

         

stubie

5:51 pm on Feb 22, 2006 (gmt 0)



I am new to XML and am working on a project that involves hyperlinks to documents on our website. Below is an example:

<?xml version="1.0"?>
- <Validator>
- <Mechanical link="http://www.mechanical.com">
<Specifications link="http://www.specifications.com" />
</Mechanical>
- <Electrical>
- <Interface link="http://www.genelectricalinterface.com">
<TTL link="http://www.ttl.com" />
<RS232 link="http://www.RS232.com" />
<Current_Loop link="http://www.currentloop.com" />
</Interface>
<Specifications />
</Electrical>
</Validator>

I will be breaking down a machine and like how XML has the compress/expand capabilities. I would like it to look like it does when you load up the XML file in a browser, but would like the links to operate.

Thanks for the help...

choster

7:57 pm on Feb 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



stubie, welcome to WebmasterWorld.

The short answer is that to make the hyperlinks active, you can't just deliver the XML document to the end user-- you need to transform it into HTML or another language which has link notation that the web browser can understand. You can then use a scripting language like Javascript to produce the expanding/collapsing behavior.