Terry Kakavros Posted May 5, 2009 Posted May 5, 2009 (edited) I am new when it comes to creating a style sheet to be used when importing xml data. I have read through the previous posts and I have changed my code numerous times and I am still not having any luck. I would appreciate any help! XML Data: <?xml version="1.0" encoding="ISO-8859-1" ?> - - 5465182 xxxx 2 $249.62 G5465182 $47.05 $296.67 COLUMBIANA, OH 1-800-333-9974 WILSON, NC 1-800-545-3017 $1,680.50 $1,445.23 $14.35 $70.58 $320.20 $94.11 $343.73 900 1700 Style Sheet: <?xml version="1.0" encoding="ISO-8859-1" 0 Edited May 5, 2009 by Guest
comment Posted May 5, 2009 Posted May 5, 2009 Not sure exactly what problems you are experiencing, but they are most likely caused by line #2 of your XML Data: To begin with, the text "- " is not contained by any element, and it will cause an error. If you remove this text, the element will be "wrapping" the rest of the data - so you need to change your for-each selection to:
Terry Kakavros Posted May 5, 2009 Author Posted May 5, 2009 The source of the xml data does not have the "-" I just copied that content from the web viewer within File Maker. If I open my style sheet within a XML writer and if I check the style sheet if it is well formed I get an invalid syntax error for line 2 of the style sheet. When I'm in File Maker and I try to import the xml data from the url I get an Error that says... XML parsing Error: Expected a 'version=', encoding=', or 'standalone=' Line Number:2 Column Number:16
comment Posted May 5, 2009 Posted May 5, 2009 Can you attach a zipped version of both text files? There are limits to what this forum can show. If your source is served, open it in a web browser and save it as text.
Terry Kakavros Posted May 5, 2009 Author Posted May 5, 2009 See attached files xmldata.txt stylessheet.txt
comment Posted May 5, 2009 Posted May 5, 2009 The xml declaration must end with "?>". I am not sure if this is a transmission problem (I suggested zipping the files), but once I fixed that, it worked. stylesheet.xsl.zip
Recommended Posts
This topic is 5681 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now