Salakhetdinov Shamil
mcp2004 at mail.ru
Fri Jun 29 06:52:03 CDT 2012
Hi Gustav -- > I guess the API method would be marginally faster for fetching small > files and few values - but very inflexible. Well, 'flexibility', 'adaptability',... don't have an absolute meaning for software projects, do they? API + parsing "naive hardcoder"'s "quick & dirty" solution could be considered as the most flexible in some contexts - after all it doesn't depend on XML parsers, XSL transformations etc. - it just works... Thank you. -- Shamil Fri, 29 Jun 2012 13:27:09 +0200 от "Gustav Brock" <gustav at cactus.dk>: Hi Shamil No no. By the phrasing: > next step would be to just download the xml-string and parse it. I just meant to fetch the file content without using the XML library and then parse it (the same way as you demonstrated or similar). As to your project, I guess the API method would be marginally faster for fetching small files and few values - but very inflexible. /gustav >>> mcp2004 at mail.ru 29-06-12 12:23 >>> Hi Gustav -- OK. But Dim uri As String uri = "http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml" Dim xmlDoc As New MSXML2.DOMDocument30 xmlDoc.async = False xmlDoc.Load (uri) does download XML file from the source URI. You did also noted on parsing but "naive-hardcoder approach" sample does use parsing: Dim xml As String xml = xmlDoc.DocumentElement.xml Dim pos1 As Integer Dim pos2 As Integer Dim currencyCode As String currencyCode = "RUB" pos1 = InStr(xml, "currency=""" + currencyCode) pos1 = InStr(pos1, xml, "rate=""") pos1 = InStr(pos1 + 1, xml, """") pos2 = InStr(pos1 + 1, xml, """") Dim currencyRate As String currencyRate = Mid(xml, pos1 + 1, pos2 - pos1 - 1) What other parsing technique did you mean? I'm a kind of starting collecting different approaches/techniques to solve the same tasks as a way to investigate modern application software development *technologies, their applicability for effective solutions of real life tasks in different contexts, their advantages and limitations, their flexibility to be adapted to ever changing requirements etc. More on that is planned here to be posted in dba-VB if free-time allows... Thank you. -- Shamil -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com