Re: Use "value" as an attribute name
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Thursday, September 23, 2010, 12:53:41 AM, Upravdom wrote: > Hello folks. > > Let's say I have an XML like this: > <items> > <item param="123" value="456"/> > <item param="123" value="456"/> > <item param="123" value="456"/> > </items> > > How do I get the value of the attribute "value"? > If I iterate through list of "items", making that list a "var" sequence > variable, then var.value.value doesn't seem to be working. Try this: var.@value The @ indicates that you refer to an attribute (*AT*tribute, you get it...), as opposed to the children "value" elements. See also: http://freemarker.org/docs/xgui_imperative_learn.html > Any ideas? -- Best regards, Daniel Dekany ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev