User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 401,633 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,849 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 493 | Replies: 2
Reply
Join Date: Feb 2008
Posts: 1
Reputation: bvalvo is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bvalvo bvalvo is offline Offline
Newbie Poster

Help Using XML data to link a new server

  #1  
Feb 11th, 2008
Please excuse me if this is not the correct forum for this question.

"How do I code HTML to use XML data in a web link?"

I want to use XML data to easily change server names for links on 15+ web sites with 100+ pages. Normally, a link would look like this:

"<a href='http://server1.someplace.com/..."

I want to place XML data in place of the server name. I've built an XML file with an element called "servername" and set it to "server1.someplace.com".

How do I get this to work? All help is greatly appreciated.

BTW: I'm using Dreamweaver CS3.

Bill
Last edited by bvalvo : Feb 11th, 2008 at 10:32 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: New York state
Posts: 454
Reputation: ShawnCplus will become famous soon enough ShawnCplus will become famous soon enough 
Rep Power: 5
Solved Threads: 66
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: Using XML data to link a new server

  #2  
Feb 11th, 2008
You can't code anything in HTML but if you are using a server-side language like PHP, ASP, etc. they all have functionality to parse XML files though I've only dealt with PHP XML parsing
GCS d- s+:+ a-->? C++(++++) UL+++ P+>+++ L+++ !E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r z+*
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,220
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 10
Solved Threads: 270
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Using XML data to link a new server

  #3  
Feb 11th, 2008
You can use JavaScript like in this example, but I personaly consider to be too complicated for beginners. Simple way around can be to transfer your html documents to xsl documents. Then your dynamic linking can be simple like this
<p class="link" style="cursor: pointer;"> 
        <xsl:attribute name="onClick">show('<xsl:value-of select="servername"/>');
        </xsl:attribute>
         <xsl:value-of select='servername'/>
</p>
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 6:09 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC