Simplest way to convert XML file and/or web service to a flat file
I am starting a project in which I need to get two sets of data into flat files. Source A is a web service that is updated daily, so I only need to hit this once a day. Source B is an XML file on an FTP site th开发者_StackOverflowat I will also retrieve daily.
I have never converted XML to a flat file before. I'm a SQL Server guy, so my initial thought was to work on getting the data into SQL Server, then export to flat files. However, am I wasting my time doing that? Should I just use a conversion tool such as XMLConvert and skip SQL Server entirely? The data files are fairly small, so performance is not an issue. I need to get this done as quickly as possible. What suggestions do you folks have? Thank you!
I have used Stylus Studio to create XSLT and was very happy with the features. http://www.stylusstudio.com/
I have also used XML Spy, but not the XSLT features. http://www.altova.com/xmlspy.html
Once you have the XSLT created the code to transform the XML is fairly straightforward. http://msdn.microsoft.com/en-us/library/ms757854(v=VS.85).aspx
I've used this method to convert XML into HTML, but not a flat file, but it should work.
Converting XML to other (text-based) formats is probably best done using something like XSLT. http://www.w3schools.com/xsl/
精彩评论