» cn.XML
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

cn.XML

English Version: XML

vvvv可以用 XPath (XML)XSLT (XML) 以丰富的手法解析XML。

如果你用文本编辑器打开过 .v4p? 文件,你就能发现它们实际上就是纯XML。
所以以下例子都是基于vvvv自己的文件。

关于 XPath (XML)


返回一个符合XPath-Query结果的铺展。
XPath 是W3C建议标准,它描述了一种如何在XML文档中游历的方法。
我们可以应用XPath来从XML文档中选择一个元素的值。每一个XPath表达式都必须以 "/" 开头。一个XPath 表达式的工作方式有点类似与在一个文件系统中游历,斜杠 (/) 表示选择一个子目录。
[ ] 中你可以表述你的Query,然后你继续用 "/" 定义路径。"@" 表示你选择了一个属性。

你可以使用很多函数和操作符。我们无法给出一个关于XPath的详尽的指导。你可以从Microsoft Reference Online上获取更多的信息。
有一个学习X-Stuff的好站点http://www.w3schools.com
关于 XPath 句法和函数的参考可参见http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/WD_XMLStd/html/6d68ea8c-9e38-4800-896d-95e7521dc4fd.asp

范例

用这个问句解析一个 .v4p 文件

/PATCH/NODE/PIN[@pinname='Descriptive Name']/@values

可以输出一个包含在该程序片中用到的所有描述性名称的铺展。

/PATCH/NODE[@id='7']/@nodename

会输出id号等于7的节点的节点名。

这就是你可以以类似于在你的硬盘上的文件系统上游历方式在XML中的游历方式。

你也可以做像这样的更高级的问句:

/PATCH/NODE[(@nodename='IOBox (Value Advanced)')and(not(PIN[contains(@pinname,'Descriptive Name')]))]/@id

这个会输出一个所有不具备某个描述性名称的的节点的IOBox Value的id号的铺展。

提示


关于 XSLT (XML)

此处有待进一步撰写

anonymous user login

Shoutbox

~11d ago

fleg: This Tuesday, Cologne: exhibition opening of "interwoven", textile disinformation patterns created with vvvv. https://fleg.de/news/exhibition-interwoven

~25d ago

manuelgonzalvez: Assimp nodes all broken afted Win Update w/exception "COM object that has been separated from its underlying RCW(...)"

~25d ago

manuelgonzalvez: @levi thanks would love to! anyway managed to get something similar working based on forum search and anthokio's patches.

~25d ago

levi: @ravasquez thanks. 31.2 x86 verrion worked. @manuelgonzalvez i have a dx11 projectTexture if u a want.

~26d ago

manuelgonzalvez: Anyone has a dx11 port of "projectedTexture" dx9 fx for projection mapping?

~26d ago

manuelgonzalvez: Anyone has a dx11 port of "projectedTexture" dx9 fx for projection mapping?

~27d ago

ravazquez: @levi not sure bout the ImagePack, but I believe VL.OpenCV should give you the same tools and should work with beta just fine

~27d ago

levi: anyone knows of a VVVVpacks.image that works for elliot's projector calibration patches?x64,dx11. always crashes v4 on solve.

~1mth ago

Lorenz: VJing with GIFS: https://lorenzpotthast.de/gifjockey/ A fun little side project, that I first prototyped in v4 and now turned web-based ;)

~2mth ago

schlonzo: finally fixed in 4.8 nice1