Importing Line Breaks

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Importing Line Breaks

Jeremy Olmstead
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
Reply | Threaded
Open this post in threaded view
|

Re: Importing Line Breaks

BJ Freeman

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
>

Reply | Threaded
Open this post in threaded view
|

Re: Importing Line Breaks

Jeremy Olmstead
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 <[hidden email]> 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
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Importing Line Breaks

BJ Freeman
if these are to be read by browser,then use <br>
you can escape it to pass through.
&lt;br&gt;

=========================
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<[hidden email]>  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
>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Importing Line Breaks

Scott Gray-2
In reply to this post by Jeremy Olmstead
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 <[hidden email]> 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
>>>
>>>
>>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Importing Line Breaks

Jeremy Olmstead
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 <[hidden email]>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 <[hidden email]> 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
> >>>
> >>>
> >>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Importing Line Breaks

Scott Gray-2
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 <[hidden email]>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 <[hidden email]> 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
>>>>>
>>>>>
>>>>
>>
>>


smime.p7s (3K) Download Attachment