Ugo
No, I don't want to make it more complicated than
it needs to be - but perhaps because it seems obscure
then I assume it's complex.
I agree that storing well-formed XML data is the
ideal here... the solution you propose is one which
(a) works on a single field, and
(b) stores that field as a CLOB in a RDB
Right? I am trying to solve the problem of having
the data from a number of CForm fields stored back into
an XML file using the existing CForms framework. So,
a "simple" (to me) solution is one which identifies where
and how I insert the code-call you have written into the
exisiting framework. To keep it really simple, you could
refer to the Cocoon sample that uses (or could use)
htmlArea ;-) e.g.
samples/blocks/forms/form2xml.flow or
samples/blocks/forms/htmlarea
Thanks
Derek
>>> [EMAIL PROTECTED] 2004/11/23 07:52:24 PM >>>
Il giorno 23/nov/04, alle 14:39, Derek Hohls ha scritto:
> Well, all this may be clear to you... but not to me :{
I'm not saying that it should be crystal clear to you, just that you
should not try to make it more complex than it is :)
> Where I am trying to get to is not to deal with single
> "bits" of htmlArea text, but with an entire file created
> using a Cform. Are you proposing that each field containing
> htmlArea text must be "intercepted" and processed before
> the form data is stored?
Yes. It would be better if you stored well-formed XML data by cleaning
it once rather than every time you read it back.
> I am not sure why you have created the "dom" variable
> in your script below, or what you would do with it.
My method returns an org.w3c.dom.Document, i.e. an in-memory
representation of a well-formed XML document. What you want to do with
it is up to you. In the application from which I excerpted that class,
I serialize it to a String and store it in a CLOB in a relational
database.
> There are likely to be a number of users, all creating and
> drawing data from different files via CForms; is this
> likely to be a problem?
If contention is a problem, you can always pool instances of XML
parsers, or use the parser provided by Avalon that is already pooled
and made available to Cocoon components. Since I usually tend to stay
away from Avalon code, I am sorry but I cannot help you with this.
Ugo
--
Ugo Cei - http://beblogging.com/
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]