Skip to main content



      Home
Home » Modeling » QVT-OML » Access values between tags via qvto
Access values between tags via qvto [message #1008379] Tue, 12 February 2013 03:54 Go to next message
Eclipse UserFriend
Hello,

is it possible to access values between tags via qvto?
For example i have something like this in a xml document:
<tag> value </tag>
and the xml is conform to my ecore. In the ecore i marked the element which defines the specific tag as "simple" by the extended metadata.
Nevertheless i can't access the value between the tags.
Does anybody know how i can read out this value using a qvto or an ocl operation?

Best regards,

Andreas
Re: Access values between tags via qvto [message #1008437 is a reply to message #1008379] Tue, 12 February 2013 08:32 Go to previous message
Eclipse UserFriend
Hi

If you used a model as input the tag value should already have been
extracted making access trivial.

OCL (and QVTo) are not primarily designed for text processing, there are
much better languages for that, but if you really must then you need to
look at the functions in the string library. The Juno version added
additional regular expression functions that may help.

Regards

Ed Willink


On 12/02/2013 08:54, Andreas Burger wrote:
> Hello,
>
> is it possible to access values between tags via qvto?
> For example i have something like this in a xml document:
> <tag> value </tag>
> and the xml is conform to my ecore. In the ecore i marked the element
> which defines the specific tag as "simple" by the extended metadata.
> Nevertheless i can't access the value between the tags.
> Does anybody know how i can read out this value using a qvto or an ocl
> operation?
>
> Best regards,
>
> Andreas
Previous Topic:Specifying concrete output model
Next Topic:[Announce] Eclipse QVT Operational 3.2.2 (Juno SR2) is now available
Goto Forum:
  


Current Time: Sat Jul 05 18:25:28 EDT 2025

Powered by FUDForum. Page generated in 0.02160 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top