You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Jeremy Olmstead <jo...@gmail.com> on 2010/12/14 21:02:39 UTC
Importing Line Breaks
If I have a text field that I want to import from an xml file, how do I code
line breaks in the xml file?
Thanks,
Jeremy
Re: Importing Line Breaks
Posted by BJ Freeman <bj...@free-man.net>.
if these are to be read by browser,then use <br>
you can escape it to pass through.
<br>
=========================
BJ Freeman
Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist
Chat Y! messenger: bjfr33man
Jeremy Olmstead sent the following on 12/14/2010 12:22 PM:
> What I meant is that I have a database outside of ofbiz with a long text
> field that includes line breaks. I am building the xml files outside of
> ofbiz for importing into the ofbiz database. How can I code the xml file so
> that ofbiz imports the data with the same line breaks as from the original
> database field?
>
> Thanks,
> Jeremy
>
> On Tue, Dec 14, 2010 at 2:07 PM, BJ Freeman<bj...@free-man.net> wrote:
>
>>
>> in ofbiz, what is the requirement of having line beaks in xml.
>> if you talking about
>> <>linebreak
>> <>
>> this is not necessary for importing.
>> if you want to do this get an xml editor that will format the xml file.
>>
>>
>> =========================
>> BJ Freeman
>> Strategic Power Office with Supplier Automation<
>> http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>> Specialtymarket.com<http://www.specialtymarket.com/>
>> Systems Integrator-- Glad to Assist
>>
>> Chat Y! messenger: bjfr33man
>>
>>
>> Jeremy Olmstead sent the following on 12/14/2010 12:02 PM:
>>
>> If I have a text field that I want to import from an xml file, how do I
>>> code
>>> line breaks in the xml file?
>>>
>>> Thanks,
>>> Jeremy
>>>
>>>
>>
>
Re: Importing Line Breaks
Posted by Scott Gray <sc...@hotwaxmedia.com>.
You're welcome. Just as an FYI, the form widget automatically converts line breaks to <br /> tags for display fields but freemarker won't so if you intend on displaying them via a template you'd need to manually replace them prior to rendering. Something like ${theText?replace("\n", "<br />")}
Regards
Scott
HotWax Media
http://www.hotwaxmedia.com
On 15/12/2010, at 11:53 AM, Jeremy Olmstead wrote:
> You are correct. When I put <br> in for the breaks it took them literally.
> When I just left the breaks alone they imported correctly. Thank you!
>
> Jeremy
>
> On Tue, Dec 14, 2010 at 4:43 PM, Scott Gray <sc...@hotwaxmedia.com>wrote:
>
>> If I'm not wrong then you shouldn't need to do anything special, the line
>> breaks would be included in the xml during export, such as:
>> <![CDATA[Here
>> are
>> many
>> line
>> breaks.]]>
>>
>> And then those same link breaks would arrive into the OFBiz database during
>> import.
>>
>> Regards
>> Scott
>>
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>> On 15/12/2010, at 9:22 AM, Jeremy Olmstead wrote:
>>
>>> What I meant is that I have a database outside of ofbiz with a long text
>>> field that includes line breaks. I am building the xml files outside of
>>> ofbiz for importing into the ofbiz database. How can I code the xml file
>> so
>>> that ofbiz imports the data with the same line breaks as from the
>> original
>>> database field?
>>>
>>> Thanks,
>>> Jeremy
>>>
>>> On Tue, Dec 14, 2010 at 2:07 PM, BJ Freeman <bj...@free-man.net> wrote:
>>>
>>>>
>>>> in ofbiz, what is the requirement of having line beaks in xml.
>>>> if you talking about
>>>> <>linebreak
>>>> <>
>>>> this is not necessary for importing.
>>>> if you want to do this get an xml editor that will format the xml file.
>>>>
>>>>
>>>> =========================
>>>> BJ Freeman
>>>> Strategic Power Office with Supplier Automation <
>>>> http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>>>> Specialtymarket.com <http://www.specialtymarket.com/>
>>>> Systems Integrator-- Glad to Assist
>>>>
>>>> Chat Y! messenger: bjfr33man
>>>>
>>>>
>>>> Jeremy Olmstead sent the following on 12/14/2010 12:02 PM:
>>>>
>>>> If I have a text field that I want to import from an xml file, how do I
>>>>> code
>>>>> line breaks in the xml file?
>>>>>
>>>>> Thanks,
>>>>> Jeremy
>>>>>
>>>>>
>>>>
>>
>>
Re: Importing Line Breaks
Posted by Jeremy Olmstead <jo...@gmail.com>.
You are correct. When I put <br> in for the breaks it took them literally.
When I just left the breaks alone they imported correctly. Thank you!
Jeremy
On Tue, Dec 14, 2010 at 4:43 PM, Scott Gray <sc...@hotwaxmedia.com>wrote:
> If I'm not wrong then you shouldn't need to do anything special, the line
> breaks would be included in the xml during export, such as:
> <![CDATA[Here
> are
> many
> line
> breaks.]]>
>
> And then those same link breaks would arrive into the OFBiz database during
> import.
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 15/12/2010, at 9:22 AM, Jeremy Olmstead wrote:
>
> > What I meant is that I have a database outside of ofbiz with a long text
> > field that includes line breaks. I am building the xml files outside of
> > ofbiz for importing into the ofbiz database. How can I code the xml file
> so
> > that ofbiz imports the data with the same line breaks as from the
> original
> > database field?
> >
> > Thanks,
> > Jeremy
> >
> > On Tue, Dec 14, 2010 at 2:07 PM, BJ Freeman <bj...@free-man.net> wrote:
> >
> >>
> >> in ofbiz, what is the requirement of having line beaks in xml.
> >> if you talking about
> >> <>linebreak
> >> <>
> >> this is not necessary for importing.
> >> if you want to do this get an xml editor that will format the xml file.
> >>
> >>
> >> =========================
> >> BJ Freeman
> >> Strategic Power Office with Supplier Automation <
> >> http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> >> Specialtymarket.com <http://www.specialtymarket.com/>
> >> Systems Integrator-- Glad to Assist
> >>
> >> Chat Y! messenger: bjfr33man
> >>
> >>
> >> Jeremy Olmstead sent the following on 12/14/2010 12:02 PM:
> >>
> >> If I have a text field that I want to import from an xml file, how do I
> >>> code
> >>> line breaks in the xml file?
> >>>
> >>> Thanks,
> >>> Jeremy
> >>>
> >>>
> >>
>
>
Re: Importing Line Breaks
Posted by Scott Gray <sc...@hotwaxmedia.com>.
If I'm not wrong then you shouldn't need to do anything special, the line breaks would be included in the xml during export, such as:
<![CDATA[Here
are
many
line
breaks.]]>
And then those same link breaks would arrive into the OFBiz database during import.
Regards
Scott
HotWax Media
http://www.hotwaxmedia.com
On 15/12/2010, at 9:22 AM, Jeremy Olmstead wrote:
> What I meant is that I have a database outside of ofbiz with a long text
> field that includes line breaks. I am building the xml files outside of
> ofbiz for importing into the ofbiz database. How can I code the xml file so
> that ofbiz imports the data with the same line breaks as from the original
> database field?
>
> Thanks,
> Jeremy
>
> On Tue, Dec 14, 2010 at 2:07 PM, BJ Freeman <bj...@free-man.net> wrote:
>
>>
>> in ofbiz, what is the requirement of having line beaks in xml.
>> if you talking about
>> <>linebreak
>> <>
>> this is not necessary for importing.
>> if you want to do this get an xml editor that will format the xml file.
>>
>>
>> =========================
>> BJ Freeman
>> Strategic Power Office with Supplier Automation <
>> http://www.businessesnetwork.com/automation/viewforum.php?f=52>
>> Specialtymarket.com <http://www.specialtymarket.com/>
>> Systems Integrator-- Glad to Assist
>>
>> Chat Y! messenger: bjfr33man
>>
>>
>> Jeremy Olmstead sent the following on 12/14/2010 12:02 PM:
>>
>> If I have a text field that I want to import from an xml file, how do I
>>> code
>>> line breaks in the xml file?
>>>
>>> Thanks,
>>> Jeremy
>>>
>>>
>>
Re: Importing Line Breaks
Posted by Jeremy Olmstead <jo...@gmail.com>.
What I meant is that I have a database outside of ofbiz with a long text
field that includes line breaks. I am building the xml files outside of
ofbiz for importing into the ofbiz database. How can I code the xml file so
that ofbiz imports the data with the same line breaks as from the original
database field?
Thanks,
Jeremy
On Tue, Dec 14, 2010 at 2:07 PM, BJ Freeman <bj...@free-man.net> wrote:
>
> in ofbiz, what is the requirement of having line beaks in xml.
> if you talking about
> <>linebreak
> <>
> this is not necessary for importing.
> if you want to do this get an xml editor that will format the xml file.
>
>
> =========================
> BJ Freeman
> Strategic Power Office with Supplier Automation <
> http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> Specialtymarket.com <http://www.specialtymarket.com/>
> Systems Integrator-- Glad to Assist
>
> Chat Y! messenger: bjfr33man
>
>
> Jeremy Olmstead sent the following on 12/14/2010 12:02 PM:
>
> If I have a text field that I want to import from an xml file, how do I
>> code
>> line breaks in the xml file?
>>
>> Thanks,
>> Jeremy
>>
>>
>
Re: Importing Line Breaks
Posted by BJ Freeman <bj...@free-man.net>.
in ofbiz, what is the requirement of having line beaks in xml.
if you talking about
<>linebreak
<>
this is not necessary for importing.
if you want to do this get an xml editor that will format the xml file.
=========================
BJ Freeman
Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist
Chat Y! messenger: bjfr33man
Jeremy Olmstead sent the following on 12/14/2010 12:02 PM:
> If I have a text field that I want to import from an xml file, how do I code
> line breaks in the xml file?
>
> Thanks,
> Jeremy
>