🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.xml
Article #19

Re: XML jeszcze raz

#19
From: Konrad Lepiarz
Date: Wed, 30 Aug 2000 15:24
28 lines
1769 bytes
> Aby plik XMLowy uzywal XSL'a
> musisz dodac w naglowku pliku XML'owego linie
> <?xml-stylesheet type="text/xsl" href="NAZWA_PLIKU.xsl"?>

Ewentualnie gdy chcesz zamienic XML+XSL na HTML po stronie serwera to w ASP:

<%@ LANGUAGE = JScript %>
<%
  // Set the source and style sheet locations here
  var sourceFile = Server.MapPath("simple.xml");
  var styleFile = Server.MapPath("simple.xsl");

  // Load the XML
  var source = Server.CreateObject("Microsoft.XMLDOM");
  source.async = false;
  source.load(sourceFile);
  // Load the XSL
  var style = Server.CreateObject("Microsoft.XMLDOM");
  style.async = false;
  style.load(styleFile);
  Response.Write(source.transformNode(style));
%>

gdzie simple.xml i simple.xsl to oczywiscie odpowiednie pliki z danymi.
Polecam lekture XML SDK 2.5 ze strony msdn.microsoft.com

pozdro
konrad
Technical Details
Message-ID: <8oj8v1$i81$1@korweta.task.gda.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.man.poznan.pl!news.task.gda.pl!not-for-mail
References: <8oitmc$oka$1@news.tpi.pl> <8oj2am$53u$1@info.nask.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.man.poznan.pl!news.task.gda.pl!not-for-mail
From: "Konrad Lepiarz" <konrad@isinfo.pl>
Newsgroups: pl.comp.xml
Subject: Re: XML jeszcze raz
Date: Wed, 30 Aug 2000 17:24:45 +0200
Organization: CI TASK http://news.task.gda.pl/
Lines: 31
Message-ID: <8oj8v1$i81$1@korweta.task.gda.pl>
References: <8oitmc$oka$1@news.tpi.pl> <8oj2am$53u$1@info.nask.pl>
NNTP-Posting-Host: maurek.phu.pl
X-Trace: korweta.task.gda.pl 967649057 18689 153.19.178.82 (30 Aug 2000 15:24:17 GMT)
X-Complaints-To: abuse@news.task.gda.pl
NNTP-Posting-Date: 30 Aug 2000 15:24:17 GMT
X-Newsreader: Microsoft Outlook Express 5.00.2417.2000
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit