Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 12-09-2012, 03:29 PM   #1
ddeaton1987
Newly Registered User
 
Join Date: Dec 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
ddeaton1987 is on a distinguished road
Problem importing .XML file into Access 2010 with a .XSL via transform

I'm having difficulty getting my import to work... when i call on the original XML file I get too many tables... when i call on the XML file using the transform function of Access with the XSL file it gives me only two tables "body" and "tr". Body contains the value "Weather" and tr contains the value "Day". I know there's a problem with my XSL file but I can't figure out what it is... I hope to accomplish is the following:

Import the day as month/day/year into a field "Day" in access table "WeatherSFCAL"
Import the Fahrenheit temp from the high section into the field "High" in access table "WeatherSFCAL"
Import the Fahrenheit temp from the low section into the field "Low" in access table "WeatherSFCAL"

It would not let me upload these files so I'll paste the data in two posts below:

ddeaton1987 is offline   Reply With Quote
Old 12-09-2012, 03:31 PM   #2
ddeaton1987
Newly Registered User
 
Join Date: Dec 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
ddeaton1987 is on a distinguished road
Re: Problem importing .XML file into Access 2010 with a .XSL via transform

XML File:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl=""i can't post links w3 org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <body>
  <h2>Weather</h2>
    <table border="1">
      <tr bgcolor="#9acd32">
        <th>High</th>
        <th>Low</th>
        <th>Day</th>
      </tr>
      <xsl:for-each select="response/forecast/simpleforecast/forecastdays/forecastday">
      <tr>
        <td><xsl:value-of select="high/fahrenheit"/></td>
        <td><xsl:value-of select="low/fahrenheit"/></td>
        <td><xsl:value-of select="date/month"/>
        <xsl:text>/</xsl:text>
        <xsl:value-of select="date/day"/>
        <xsl:text>/</xsl:text>
        <xsl:value-of select="date/year"/></td>
      </tr>
      </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>
ddeaton1987 is offline   Reply With Quote
Old 12-09-2012, 03:35 PM   #3
ddeaton1987
Newly Registered User
 
Join Date: Dec 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
ddeaton1987 is on a distinguished road
Re: Problem importing .XML file into Access 2010 with a .XSL via transform

First part of XML File:
Code:
<response>
    <version>0.1</version>
    <termsofService>link blah blah blah</termsofService>
    <features>
        <feature>forecast10day</feature>
    </features>
    <forecast>
        <txt_forecast>
        <date>1:00 PM PST</date>
        <forecastdays>
        <forecastday>
        <period>0</period>
        <icon>rain</icon>
        <icon_url>cons-ak.wxug.com/i/c/k/rain.gif</icon_url>
        <title>Tuesday</title>
        <fcttext><![CDATA[Mostly cloudy with a chance of rain, then  rain in the afternoon. High of 63F. Winds from the South at 5 to 10 mph. Chance of rain 70%.]]></fcttext>
        <fcttext_metric><![CDATA[Mostly cloudy with a chance of rain, then  rain in the afternoon. High of 17C. Winds from the South at 5 to 15 km/h. Chance of rain 70%.]]></fcttext_metric>
        <pop>70</pop>
        </forecastday>
        <forecastday>
        <period>1</period>
        <icon>rain</icon>
        <icon_url>k.wxug.com/i/c/k/rain.gif</icon_url>
        <title>Tuesday Night</title>
        <fcttext><![CDATA[Mostly cloudy with rain. Low of 55F. Winds from the South at 5 to 15 mph. Chance of rain 80% with rainfall amounts near 0.2 in. possible.]]></fcttext>
        <fcttext_metric><![CDATA[Mostly cloudy with rain. Low of 13C. Breezy. Winds from the South at 10 to 25 km/h. Chance of rain 80% with rainfall amounts near 5.8 mm possible.]]></fcttext_metric>
        <pop>80</pop>
        </forecastday>
        <forecastday>
        <period>2</period>
        <icon>rain</icon>
        <icon_url>cons-ak.wxug.com/i/c/k/rain.gif</icon_url>
        <title>Wednesday</title>
        <fcttext><![CDATA[Mostly cloudy with rain, then  rain showers in the afternoon. High of 64F. Breezy. Winds from the SSW at 10 to 20 mph. Chance of rain 80%.]]></fcttext>
        <fcttext_metric><![CDATA[Mostly cloudy with rain, then  rain showers in the afternoon. High of 18C. Breezy. Winds from the SSW at 15 to 25 km/h. Chance of rain 80%.]]></fcttext_metric>
        <pop>80</pop>
        </forecastday>
        <forecastday>
        <period>3</period>
        <icon>partlycloudy</icon>
        <icon_url>ns-ak.wxug.com/i/c/k/partlycloudy.gif</icon_url>
        <title>Wednesday Night</title>
        <fcttext><![CDATA[Partly cloudy with a chance of rain. Low of 54F. Winds from the West at 5 to 10 mph. Chance of rain 20%.]]></fcttext>
        <fcttext_metric><![CDATA[Partly cloudy with a chance of rain. Low of 12C. Winds from the West at 5 to 15 km/h.]]></fcttext_metric>
        <pop>20</pop>
        </forecastday>
        <forecastday>
        <period>4</period>
        <icon>partlycloudy</icon>
        <icon_url>com/i/c/k/partlycloudy.gif</icon_url>
        <title>Thursday</title>
        <fcttext><![CDATA[Partly cloudy. High of 59F. Breezy. Winds from the WNW at 10 to 20 mph.]]></fcttext>
        <fcttext_metric><![CDATA[Partly cloudy. High of 15C. Windy. Winds from the WNW at 15 to 30 km/h.]]></fcttext_metric>
        <pop>10</pop>
        </forecastday>
        <forecastday>
        <period>5</period>
        <icon>partlycloudy</icon>
        <icon_url>com/i/c/k/partlycloudy.gif</icon_url>
        <title>Thursday Night</title>
        <fcttext><![CDATA[Partly cloudy in the evening, then clear. Low of 48F. Breezy. Winds from the NW at 10 to 20 mph.]]></fcttext>
        <fcttext_metric><![CDATA[Partly cloudy in the evening, then clear. Low of 9C. Breezy. Winds from the NW at 20 to 25 km/h.]]></fcttext_metric>
        <pop>0</pop>
        </forecastday>
        <forecastday>
        <period>6</period>
        <icon>partlycloudy</icon>
        <icon_url>k/partlycloudy.gif</icon_url>
        <title>Friday</title>
        <fcttext><![CDATA[Partly cloudy. High of 61F. Winds from the NNW at 10 to 15 mph.]]></fcttext>
        <fcttext_metric><![CDATA[Partly cloudy. High of 16C. Breezy. Winds from the NNW at 20 to 25 km/h.]]></fcttext_metric>
        <pop>0</pop>
        </forecastday>
        <forecastday>
        <period>7</period>
        <icon>partlycloudy</icon>
        <icon_url>wxug.com/i/c/k/partlycloudy.gif</icon_url>
        <title>Friday Night</title>
        <fcttext><![CDATA[Partly cloudy. Low of 48F. Breezy. Winds from the NNW at 10 to 20 mph.]]></fcttext>
        <fcttext_metric><![CDATA[Partly cloudy. Low of 9C. Breezy. Winds from the NNW at 15 to 25 km/h.]]></fcttext_metric>
        <pop>0</pop>
        </forecastday>
        <forecastday>
        <period>8</period>
        <icon>partlycloudy</icon>
        <icon_url>s-ak.wxug.com/i/c/k/partlycloudy.gif</icon_url>
        <title>Saturday</title>
        <fcttext><![CDATA[Clear in the morning, then partly cloudy. High of 61F. Winds from the NNW at 10 to 15 mph.]]></fcttext>
        <fcttext_metric><![CDATA[Clear in the morning, then partly cloudy. High of 16C. Breezy. Winds from the NNW at 15 to 20 km/h.]]></fcttext_metric>
        <pop>0</pop>
        </forecastday>
        <forecastday>
        <period>9</period>
        <icon>partlycloudy</icon>
        <icon_url>com/i/c/k/partlycloudy.gif</icon_url>
        <title>Saturday Night</title>
        <fcttext><![CDATA[Partly cloudy. Low of 45F. Breezy. Winds from the NNE at 10 to 20 mph.]]></fcttext>
        <fcttext_metric><![CDATA[Partly cloudy. Low of 7C. Windy. Winds from the NNE at 20 to 30 km/h.]]></fcttext_metric>
        <pop>0</pop>
        </forecastday>
        <forecastday>
        <period>10</period>
        <icon>partlycloudy</icon>
        <icon_url>htm/i/c/k/partlycloudy.gif</icon_url>
        <title>Sunday</title>
        <fcttext><![CDATA[Partly cloudy. High of 61F. Winds from the NE at 10 to 15 mph.]]></fcttext>
        <fcttext_metric><![CDATA[Partly cloudy. High of 16C. Breezy. Winds from the NE at 15 to 20 km/h.]]></fcttext_metric>
        <pop>0</pop>

ddeaton1987 is offline   Reply With Quote
Old 12-09-2012, 03:40 PM   #4
ddeaton1987
Newly Registered User
 
Join Date: Dec 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
ddeaton1987 is on a distinguished road
Re: Problem importing .XML file into Access 2010 with a .XSL via transform

This XML File is way too large to post here unfortunately and would require 3 separate posts. Please let me know if you require it to diagnose the problem... the XML file is pointing to the correct locations in the file to get the info, it's just not importing correctly.,

ddeaton1987 is offline   Reply With Quote
Reply

Tags
access , import , transform , xml , xsl

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
importing excel spreadsheet with links into access 2010 Victorlabinsky General 1 11-14-2012 11:37 AM
Question Format problem in exporting access 2010 table to csv file cibili General 3 05-25-2012 08:46 AM
Question Problem facing in Importing .csv file to access Srini General 5 11-21-2011 03:24 AM
Problem with importing xls file filiep Tables 3 08-19-2010 09:27 PM
Problem with importing excell file to access geo__ General 1 11-28-2003 06:07 AM




All times are GMT -8. The time now is 12:00 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World