| |

VerySource

 Forgot password?
 Register
Search
View: 1094|Reply: 5

The citation method of link when xml is embedded in html, first aid!

[Copy link]

1

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Invalid IP Address

Post time: 2020-10-9 10:30:02
| Show all posts |Read mode
This is a very basic question for me. I hope the experts can help!
My xml document is: (see below)
I want to put it in a static html file, and then add the corresponding links to google and live, how can I do it? I'm a rookie, please tell me more in detail! Thank you so much! ! !

<?xml version="1.0" encoding="UTF-8"?>
<index>
<theme>
<moteur1>Google</moteur1>
<link1>http://www.google.fr/search?hl=fr&amp;q=Wii</link1>
<moteur2>Live</moteur2>
<link2>http://search.live.com/results.aspx?q=wii&amp;mkt=fr-fr&amp;FORM=LVSP</link2>
</theme>
<theme>
<moteur1>Google</moteur1>
<link1>http://www.google.fr/search?hl=fr&amp;q=Wii</link1>
<moteur2>Live</moteur2>
<link2>http://search.live.com/results.aspx?q=wii&amp;mkt=fr-fr&amp;FORM=LVSP</link2>
</theme>
</index>
Reply

Use magic Report

1

Threads

7

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-10-9 22:00:01
| Show all posts
xslt
Reply

Use magic Report

1

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Invalid IP Address

 Author| Post time: 2020-10-9 23:15:01
| Show all posts
I use dreamweaver to generate standard xsl code, but copying it directly into html doesn't work. What should I pay attention to? Or is it possible to use other methods? What should I do?
Reply

Use magic Report

0

Threads

11

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 Unknown

Post time: 2020-10-10 01:00:01
| Show all posts
Use XSLT to control XML output, I wrote the xslT file for you, you should use it again

The following is

<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="index">
<table width="230" border="0" cellpadding="0" cellspacing="0" bgcolor="#EDEDED">
<xsl:for-each select="index/theme">
     <tr>
       <td ><xsl:attribute name="href"><xsl:value-of select="link1"></xsl:value-of></xsl:attribute><xsl:value-of select="moteur1" ></xsl:value-of></a></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
Reply

Use magic Report

0

Threads

11

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-10-10 01:15:01
| Show all posts
I'm sorry, there is one more on it</a> you remove it
Reply

Use magic Report

1

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Invalid IP Address

 Author| Post time: 2020-10-10 07:45:01
| Show all posts
Thank you everyone!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list