BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
Microsoft ASP
A Client-side Environment for ASP Pages
WAP for ASP Developers
XML for the VB/ASP Programmer
How is XML Used in ASP (a comparison of approaches)
The Session.TimeOut Property
The Session.StaticObjects Collection
The Session.SessionID Property
The Session.LCID Property
The Session.Contents Collection
The Session.CodePage Property
The Session.Contents.RemoveAll() Method
The Session.Contents.Remove(name|index) Method
The Session.Abandon Method
The Session.OnStart() Event
The Session.OnEnd() Event
The Session Object
The Server.ScriptTimeOut Property
The Server.URLEncode Method
The Server.Transfer Method
The Server.MapPath Method
<< LAMP
 
 

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :05/18/2000
Times viewed :955

 
          

Page 1 of 4

Creating Dynamic Web pages with XML/ASP & XML format

by Andrew Price

Before we get started, lets have a quick show of hands.

Hands up all those who like writing the same piece of code more than once.

Unless you're angling for some compensation for getting repetitive strain injury or you're particularly keen to show off a new and expensive deodorant then my guess is that your arms, like mine, were kept firmly at your side.

That is why, when I wrote the XSL and scripting demo, I designed it so that I could easily add another article without having to redesign a new ASP page for each demo, by using XML and XSL.

Basically, the first demo has 4 different stylesheets which are applied to the same XML. Rather than hard-code the demo into one ASP page I decided to store the demo details in its own XML file so that it would be a simple matter to add another demo. The ASP page then reads the XML file and displays the details of whichever demo has been requested.

Lets see an XML file of the simple demo. (The comments in red are for explanatory purposes only and would not be included in a working XML document)

<VBexamples><--The root of the XML document
<example id="2"><--The root of the particular demo
<--The title of the demo

<--The authors name
<--The authors email
<--The demo heading
<--The XML file name
<--The node of an XSL example
<xslFile>test1.xsl</xslFile> <--The XSL file name
<xslTextTitle>Example 1: the first xsl</xslTextTitle><--The heading of the explanation
<xslText>Doesn't do much but its different to the other XSL's</xslText><--The explanation
<--Another XSL example
<xslFile>test2.xsl</xslFile>
<xslTextTitle>Example 2: the second xsl</xslTextTitle>
<xslText>Bigger and bolder</xslText>
</example>
</VBexamples>

To see how the ASP renders this XML, go to examples.asp?id=2

Click here to find out how the ASP code uses this XML to produce the HTML page
          

Page 1 of 4


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Software Developers Needed in Charl
Sr. Software Engineer - Analytics
Immediate Mainframe openings for Ch
Immediate TANDEM-TAL openings for C
Immediate ASP.NET/C# Openings for C

View all Jobs (Add yours)
View all CV (Add yours)



help desk support
swimming pool contractor
halloween masks
water softener
Teleconference
Host Department NOLIMIT Web Hosting
MSN
sunglasses


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP