传递的XMLDocument作为参数传递给XSLT [英] Passing XMLDocument as parameter to XSLT

查看:94
本文介绍了传递的XMLDocument作为参数传递给XSLT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想传递的XmlDocument本身作为参数传递给XSLT(不保存XML物理)。有没有办法做到这一点。我的函数接受两个XMLDOCUMENT和需要根据两个XML来创建新的XML

I would like to pass the XMLdocument itself as parameter to the XSLT (without saving the XML physically). Is there any way to do that. My function accepts two Xmldocument and need to create new XML based on the two XML.

推荐答案

变换接受一个XmlReader;您可以在您的DOM的任何元素(通常是文档元素)创建一个XmlNodeReader对象(这足够)。

The transform accepts an XmlReader; you can create an XmlNodeReader (which suffices) for any element in your DOM (typically the document element).

这篇关于传递的XMLDocument作为参数传递给XSLT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆