Re: Inserting quote char into generated output
Re: Inserting quote char into generated output
- Subject: Re: Inserting quote char into generated output
- From: Steve Peery <email@hidden>
- Date: Thu, 17 Feb 2011 10:33:44 -0500
Try WOGenericContainer
.html:
<webobject name = "GenericContainer">....</webobject>
.wod:
GenericContainer: WOGenericContainer {
elementName = "value";
name = nameString;
}
.java:
public String nameString() {
return "ABCD";
}
result:
<value name="ABCD">....</value>
Steve
On Feb 17, 2011, at 10:12 AM, Markus Ruggiero wrote:
> Hi wo-gurus,
>
> I have the following problem: I want to generate XML and need to put literal " and < char into the output. The wo parser however fails and I do not know how to effectively solve this. Let me give an example:
>
> Desired output:
>
> <value name="ABCD">....</value>
>
> ABCD comes from the database. However
>
> <value name="<webobject name="myName">">....</value>
> with binding
> myName : WOString { value=myEO.name;}
>
> does not work as the literal quotes confuse the parser. Tried to put " there but the resulting XML file is not what I need.
>
> Next try:
> <value name=<webobject name="quote" />ABCD<webobject name="quote" />>....</value>
> with binding
> quote : WOString { value=""";}
> also does not work (triple " chars). Replacing " by ' adds to the confusion of the parser at runtime.
>
> So I would have to get the binding from the java code. Is this really the only way to do it? Makes the component html pretty unreadable.
> I have a similar problem in cases where I want to generate the above value tag itself. There the parser is confused by the multiple < chars.
>
> <<webobject name="valueTag" />>
>
> Thank you all for your help
> have a nice wo-day
> ---markus---
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden