|
-
Jul 1st, 2002, 09:09 AM
#1
Thread Starter
Junior Member
Starting with XML
Hi there,
I am new to XML and basically want to know how I can set it up on a web server, so I can start serving XML based data.
I have a whole heap of XML files, but when I load them in Explorer, they just present me with the raw code.
Is there a form of engine that needs to be run on a web server in order to present the data.
Cheers,
Ben
-
Jul 1st, 2002, 09:10 AM
#2
Fanatic Member
You have to make a css file to parse the code for you or use a XSLT file.
-
Jul 1st, 2002, 09:14 AM
#3
Thread Starter
Junior Member
-
Jul 1st, 2002, 09:26 AM
#4
Fanatic Member
Yeah, I know how you feel, im just getting into it too. I bught a book yesterday and so far its seems simple enough.
-
Jul 1st, 2002, 05:50 PM
#5
Fanatic Member
exactly why would you bother with XML ? its useless unless used for cross-platform developement and sharing site configurations with others. unless you absoltely need it i wouldnt bother learning it at all 
I have a whole heap of XML files, but when I load them in Explorer, they just present me with the raw code.
to be able to transform it into html, people generally use XSL which basically apply's html elements to the XML whilst still offering pain and suffering in the process.
-
Jul 1st, 2002, 07:01 PM
#6
Thread Starter
Junior Member
Well
It is a project that I have been set to do at work. We need to implement these XML files to share data with a NOC.
I no little more, but I would like to learn how to implement it so I keep my job
-
Jul 1st, 2002, 07:49 PM
#7
Fanatic Member
Yeah that is a good reason.
-
Jul 2nd, 2002, 03:27 AM
#8
Thread Starter
Junior Member
So...I guess that's a firm *no* for offers of help
-
Jul 2nd, 2002, 05:38 AM
#9
Fanatic Member
doesn't mean that we won't help u out.
Post an example of one of the xml files and we'll put together a simple xslt for you. Also try downloading the msxml4 sdk from microsoft. They have some beginner stuff on xslt and xpath. This will help spans, trust me.
Here's something to get you started. This is taken from the msxml4 sdk:
Code:
XML (hello.xml)
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="hello.xsl"?>
<hello-world>
<greeter>An XSLT Programmer</greeter>
<greeting>Hello, World!</greeting>
</hello-world>
XSLT (hello.xsl)
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/hello-world">
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<H1><xsl:value-of select="greeting"/></H1>
<xsl:apply-templates select="greeter"/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="greeter">
<DIV>from
<I><xsl:value-of select="."/></I>
</DIV>
</xsl:template>
</xsl:stylesheet>
-
Jul 2nd, 2002, 05:46 AM
#10
-
Jul 2nd, 2002, 08:43 AM
#11
Thread Starter
Junior Member
I got it to work. However I could have done that with about 2 lines of HTML. So I don't get why a more complex weighty language is better than HTML. Anyway not to worry, I have to get this done I guess.
I've got about 10 pages of XML 'schema' I don't think posting it up would help. Would it?
Thanks for your time, much welcomed
-
Jul 2nd, 2002, 10:00 AM
#12
Lively Member
take a look here
http://www.w3schools.com/xml/
<edit>be sure to check out data islands</edit>
ubunreal69 -- I would much rather deal with xml than databases.
for me: xml - faster and more reliable, no more database connection problems
-
Jul 3rd, 2002, 12:45 AM
#13
Fanatic Member
Junior,
The example was one that showed how to use xslt not why you should use it. In any case, xml is used to transport and describe data. So it should be used in this context.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|