transfrom xml to html via url
i'm trying to load xml data into html. Right now i have 3 file (xsl,xml,html) link together in order to transform it. It's working but then how can i transform without the xml file, i mean by passing the url of xml page. Since the xml is from other website and i want the data load into others website. Is there any idea?
below is my Html file;
<link rel="stylesheet" type="text/css" href="style.css"/>
// code for IE
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument)
resultDocument = xsltProcessor.transformToFragment(xml,document);
and xsl file;
<?xml version="1.0" encoding="ISO-8859-1"?><!-- DWXMLSource="http://wsdl.sotanetwork.com/packages/2_0_2/packageservices.cfc?method=search_travel_packages" -->
<table height="50" border="0">
<table width="437" border="0" cellpadding="8">
<td width="290" valign="top" bgcolor="#FBF1AE"><p class="style1 style10"><xsl:value-of select="PACKAGE_NAME" /></p>
<p class="style10"><span class="style4"><xsl:value-of select="TOUR_DURATION" /></span></p>
<p class="style10"><span class="style4"><xsl:value-of select="TOUR_PERIOD" /></span></p>
<p class="style10"><span class="style4"><xsl:value-of select="TOUR_DESTINATION" /></span></p>
<p class="style10"><span class="style4"><xsl:value-of select="TOUR_START" /></span></p>
<p class="style10"><span class="style4"><xsl:value-of select="PRICE_FROM" /> / <xsl:value-of select="PRICE_FROM_PAX" /></span></p>
<p class="style10"><span class="style4"><xsl:value-of select="AGENT_NAME" /></span></p>
<table width="106" height="27" border="0" align="right">
<td bgcolor="#BA8E61" class="style9"><div align="center" class="style4"><a href="bakoNP.php" class="style9">View Details</a></div></td>
I'd like to help you out mashter, but first I need you to do something for me.
Repost; Your html file is incomplete. Can't tell what the xsl file generates because I do not have the classes style sheet (should be part of the html file(?). and most importantly I need the xml. What you put here is the xsl file.
When you repost please use the hash mark [the #] located in the toolbar above the message box to generate the [code] tags and place the code inside of them.
And if you have the url of the xml, that would be nice. If the xsl is also from the external site a link to that would be great also.
Not sure if I understand the question. Please re-phrase.
Thank you sunfighter, i'm not sure if can post the xml file here since it's not my work but i got a permission to use it. Assume that i use a simple xml, what i need to know is how can i include/attach the xml from website because the data is changed based on user's keyword, so thats why i dont want save the xml file and use it to transform bcoz it will display the same result for whatever keyword user use when search at my index page. Hope u understand what i trying to explain.
Can you post a minimal testcase XML illustrating what you're trying to do, at least? Fake data that roughly resembles what you're trying to do is better than no data :)
as I said..the data will change based on keyword, above is example of result (in xml format) after search a package.
|All times are GMT +1. The time now is 01:14 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.