Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » JET2 - How to get the content of a text node
JET2 - How to get the content of a text node [message #6344] Wed, 21 March 2007 10:39 Go to next message
Eclipse UserFriend
Originally posted by: vincent.lg.voila.fr

Hi everyone,

In my JET2 plugin, I would like to get the content of a text node. Say I
parse this xml file :

<root>
<node> text node </node>
</root>

My question is probably stupid but how can I retrieve the value " text
node " ? I tried with the xpath function text() which in xslt is done for
that, but it can't helps.
How can I do that ?

I'm also interested in getting tags of kind "xsi:type" but it fails. Do I
have to attach a specific modelLoader, modelSchema or something like that ?

Many thanks,
Vincent.
Re: JET2 - How to get the content of a text node [message #6404 is a reply to message #6344] Wed, 21 March 2007 10:58 Go to previous message
Eclipse UserFriend
Vincent:

The XPath expression /root/node will return the content of 'node', so

<c:get select="/root/node"/>

will write it to a template output.

Paul

"Vincent" <vincent.lg@voila.fr> wrote in message
news:a0f4f9d909ee2b355751dc7a9e8c528b$1@www.eclipse.org...
> Hi everyone,
> In my JET2 plugin, I would like to get the content of a text node. Say I
> parse this xml file :
> <root>
> <node> text node </node>
> </root>
>
> My question is probably stupid but how can I retrieve the value " text
> node " ? I tried with the xpath function text() which in xslt is done for
> that, but it can't helps.
> How can I do that ?
>
> I'm also interested in getting tags of kind "xsi:type" but it fails. Do I
> have to attach a specific modelLoader, modelSchema or something like that
> ?
>
> Many thanks, Vincent.
>
Previous Topic:JET2 - declaring custom tags
Next Topic:JET2 transformation project with multiple transformations
Goto Forum:
  


Current Time: Thu May 08 20:57:58 EDT 2025

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

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

Back to the top