如何通过 ASP.NET 从 xsl 文件中检索 xsl:output 媒体类型值
有没有办法检索媒体类型值?例如,像 OutputSettings.OutputMethod 用于获取 xsl:output 方法。
Is there a way to retrieve the media-type value? e.g. like OutputSettings.OutputMethod used to get xsl:output method.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过处理 XML 的首选方法查询 XSL 样式表(例如作为 XmlDocument)并发出以下 XPath 查询(不要忘记使用
NamespaceManager
预先使 xsl 命名空间可供 XPath 使用):.aspx 也可以通过LINQ来实现。
You could query the XSL stylesheet via your preferred method of handling XML (for example as an XmlDocument) and issue the following XPath query (don't forget to make the xsl namespace available to XPath beforehand with a
NamespaceManager
):The equivalent could be also achieved with LINQ.