> I'm wondering if there is a way to fix an attribute in an XML file
> that has carriage returns in it? I have an admin section that has a
> teaxtarea for putting in a description as well as some other fields.
> The problem is if the user puts carriage returns in the textarea the
> xml file outputs like:
>
> <event title="Test Event" description="This is a test event
>
> with some events in it
> " startDate="2004-07-18" endDate="2004-07-18" allDay="0" eventType="once" />
>
> This of course breaks my code when I go to read in the line of the XML
> file. I tried using StripCR() but it still writes the XML file in this
> same manner. I also used a Reg Ex but could never get the node to
> output all on one line.
>
> Anyone run into something similar and come up with a fix?
Any reason you are using an attribute and not a child element? I find
it's often better to use child elements where there is even a slight
possibility of a cr, and attributes for simple values only. Aside
from stripping the cr out, can you make either the xml use a child
node or the textarea in question a textbox?
--
~The cfml plug-in for eclipse~
http://cfeclipse.tigris.org
~open source xslt IDE~
http://treebeard.sourceforge.net
~open source XML database~
http://ashpool.sourceforge.net
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

