Jump to content

If Condition In Xml


sat88

Recommended Posts

Hello...I'm a begginer in xml and i want to ask something...How to use an "if" statement in order to appear an element with a rule...For example if something = 'this' then display the element else do not display...Below you can find the code in which i have to do what i asked.Please let me know if you want something else...<element Name="xxx" ApplyOrder="true" Type="Tab" ShowName="true" ColumnIndex="2" TabName="Options"> <Attribute Name="attname"> <Rules> <Required/> </Rules> <DefaultValue>0</DefaultValue> <ExportMode>Yes</ExportMode> <ImportMode>Yes</ImportMode> </Attribute> <Attribute Name="attname2"> <DefaultValue>1</DefaultValue> <ValueList>zzz</ValueList> <ExportMode>Yes</ExportMode> <ImportMode>Yes</ImportMode> </Attribute> </element> also we have and this element (insinde to the "<Attribute Name="attname">" ) in order to display something or not...But if we have to display something with a condition???<Visibility>Hidden</Visibility> Maybe with CDATA but how??? Thank you in advance...

Link to comment
Share on other sites

XML is not a programming language. It doesn't have conditions, variables, loops or anything like that. Other languages are supposed to interpret it. In that other language, you could read one part as a condition, and based on it read another part in a different fashion.

Link to comment
Share on other sites

ok...I understand what you said me and I saw that doesn't use conditions etc...In same cases I found that you can use a language as an attribute and to have the opportunity to write a condition...with <![CDATA[ but I dont know how and that's why I asked for this...do you know something on this...? Thank you...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...