有人guru xquery嗎?使用xquery flwor表達式在XML標記中寫入變量
我有一個XQuery的FLWOR表達式:
<dg:segment xsi:type="dg:SegmentEauType">
{
for $attr_name in fme:get-list-attribute("_att{}._attr_name")
return <attribut name="{$attr_name}">value</attribut>
}
</dg:segment>
產生
<dg:segment xsi:type="dg:SegmentEauType">
<attribut name="DIAMETREM_R">value</attribut>
<attribut name="PROVENANCEDONNEE_R">value</attribut>
<!-- etc... -->
</dg:segment>
我怎樣才能獲取XML節點?
<dg:segment xsi:type="dg:SegmentEauType">
<DIAMETREM_R>value<DIAMETREM_R>
<PROVENANCEDONNEE_R>value<PROVENANCEDONNEE_R>
<!-- etc... -->
</dg:segment>
我試過了,但是出現了錯誤。
for $attr_name in fme:get-list-attribute("_att{}._attr_name")
return <{$attr_name}>value</{$attr_name}>
不要沒關係約FME:獲取列表屬性功能...
很多的Tx!
什麼「錯誤」弄來? –