LiveCycle Xml属性绑定
问题描述:
我有一个在Livecycle Designer中设计的PDF模板。数据绑定是Simple XML。对于我需要将数据绑定到XML属性的字段之一。 例如:我的XML:LiveCycle Xml属性绑定
<product>
<price>
<oldprice visible="true">
<priceA visible="false">1.350,00</priceA>
<priceB visible="true">1.350,00</priceB>
<priceC visible="true">20,00</priceC>
<priceD visible="false">0,00</priceD>
</oldprice>
<newprice visible="true">
<priceA visible="false">1.350,00</priceA>
<priceB visible="true">1.350,00</priceB>
<priceC visible="true">20,00</priceC>
<priceD visible="false">0,00</priceD>
</newprice>
</price>
</product>
我怎样才能访问“可见”属性的值?
我试图与:
xfa.resolveNode( “product.price.oldprice.visible”)rawValue;
但它不起作用。
有人可以帮我吗?谢谢。
答
假设产品是您模式的根,你应该能够像这样引用它:
xfa.datasets.data.product.price.oldprice.visible.value
.rawValue是字段,如果你想获得的数据在您使用.value的架构代替。
如果产品不是模式的根节点,那么您还需要包含根。
谢谢您的帮助。我必须做错事,因为属性的值总是空的(空格)。如果我写.rawValue而不是.value pdf显示单词“空”我有这个问题只与属性,如果我使用XML节点我得到的值没有任何问题。 – 2015-03-10 11:14:48