Matt Malyschko Posted January 30, 2013 Posted January 30, 2013 I am trying to gather stock data from websites, such as yahoo finance. I've tried using the insert from url script step, which gives me the entire source code, but appears to have some irregularities between the source code and the actual site data... i am capable of using this, and parsing it to find the appropriate values i need, but the values are inconsistent... i've done some research in extracting from XML sources, but literally have 0 understanding of how this works... i tried copying an example I found, but it didn't work... does anyone have any advice on how i can gather this information from such sites, easily... (it doesn't have to be yahoo, just an example...) cheers!!
Opotoc Posted January 30, 2013 Posted January 30, 2013 You really need to learn XSLT, it's great! But you'll probably need some time to get into it. If you don't need it often or for a lot of data, simply parse the XML string with FileMakers text functions to extract the data. Use Middle, Left, Right and Substitute. Here you can find some CF to help you, there was even a simple XML Parse CF I think.. http://www.briandunning.com/filemaker-custom-functions/list.php It'd be definitive not the most elegant way but a very pragmatic one. -- I have attached an simple XLS to parse currency conversion rates of the European Central Bank: located at: http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml Basically the XSL structure is Everything above <METADATA> copy & do not longer think about it Within <METADATA> each <FIELD> is basically a column, the other attributes are FileMaker attributes, just copy actually they are only needed if you create a database from XML via XSLT (who does?) <RESULTSET> contains the actual data <ROW> = a row <COL> the column (field) within data <DATA> is the value to be imported. You either get data from the data in the XML within <tag>data</tag> or from an attribute of a tag <tag attribute="value> via tag/@attribute Enjoy... currency_ecb.xsl.xml
Recommended Posts
This topic is 4384 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