开发者

Need to way to grab an XML file from an URL, transform it with XSL, and present it back as a XML file that prompts a save?

开发者 https://www.devze.com 2023-01-20 16:44 出处:网络
Requirements: Raw XML is from external website I have little control via URL (eg. http://example.com/raw.xml)

Requirements:

  • Raw XML is from external website I have little control via URL (eg. http://example.com/raw.xml)
  • I need to transform it via XSL into another XML file (I already have this XSL file written and it works)
  • I need to write an asp.net or asp file that takes the url, applies the xsl transform, and outputs the resultant xml that prompts the client to save the xml to the client local disk
  • End result is a xml file that has been xsl transformed, based on xsl and xml from external website

This should not be difficult, bu开发者_如何转开发t I do not see any examples that allow me to do what is stated above. Please help! Thanks in advance!


You can get the external XML using the WebRequest class (for example).

The result can be loaded to an XML document and transformed - the transformed document can then be returned on the HttpResponse.OutputStream with the correct headers for an XML document (response-type will be either text/xml or application/xml).

0

精彩评论

暂无评论...
验证码 换一张
取 消