Epsilon Plain Xml Transformation [message #1383944] |
Tue, 27 May 2014 06:43  |
Eclipse User |
|
|
|
I have the following xml file:
<xyz-abc name="op">
<a>ddm</a>
<b>jdkd</b>
<xyz-abc name="ot">
<xyz-abc>
<a>kjdk</a>
<b>nkdnc</b>
</xyz-abc>.
So here, the element xyz-abc has a 'hyphen' in the tagname.
Now, to read xyz-abc element in the eol file :
var element=`t_xyz-abc`.all
(PS: I am using back ticks as I was getting an exception when not using them. Without back ticks, only the part after the hyphen ie., abc was being taken as the tagname.)
Althought back ticks are doing the trick to retrieve the element (not sure), but I am facing problem when I am trying to retrieve the attributes etc., of that element.
For instance, element.println() prints:
] org.eclipse.epsilon.eol.types.EolModelElementType@4094da61
But,
element.a_name.println() raises the following exception :
Property 'a_name' not found in object org.eclipse.epsilon.eol.types.EolModelElementType@4094da61
I need some suggestion on how to deal with elements which have hyphen in their tag names.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.22484 seconds