如何在xml中处理CDATA脚本 [英] how to handle CDATA script in xml
本文介绍了如何在xml中处理CDATA脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个包含CDATA脚本等功能的xml文件。
如何编译这样的文件并使用返回的值?
有没有我可以使用的c#组件或类?
以下你可以看一个例子:
<? xml version = 1.0 编码 = < span class =code-keyword> utf-8 ? >
< XFile 的xmlns:的xsi = http://www.w3.org/2001/XMLSchema-instance >
Public Const Deg2Rad As Double = Math.PI / 180
Const Rad2Deg as Double = 180 / PI
公共函数GetXValue(ByVal R为Double,ByVal phi为Double,alpha为Double)As Double
GetXValue =((R * Math.sin(rad(alpha))* Math。 sin(rad(phi)))/ Math.sin(rad(180-phi-alpha)))
结束函数
...
...
xml格式的一些数据
...
...
< / XFile >
解决方案
尝试使用此解决方案问题 [ ^ ],或使用这个项目 [ ^ ]或者谷歌的其他东西:)
hey everyone...
I have an xml file containing some functions as CDATA script.
how can I compile such a this files an use the returned values?
is there any c# component or class that I can use ?
in the following u can see an example:
<?xml version="1.0" encoding="utf-8"?>
<XFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Public Const Deg2Rad As Double = Math.PI / 180
Const Rad2Deg as Double = 180 / PI
Public Function GetXValue(ByVal R as Double, ByVal phi as Double,alpha as Double) As Double
GetXValue=((R*Math.sin(rad(alpha))*Math.sin(rad(phi)))/Math.sin(rad(180-phi-alpha)))
End Function
...
...
some data in xml format
...
...
</XFile>
解决方案
Try to use solution from this question[^], or to use this project[^] or to google for something else :)
这篇关于如何在xml中处理CDATA脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文