You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Johnny X <jo...@gmail.com> on 2009/04/14 13:26:48 UTC

Maintaining XML Layout

Hey,


One of the fields returned from my queries (Content) is essentially the body
of an e-mail. However, it's returned as one long stream of text (or at
least, that's how it appears on the web page). Viewing the source of the
page it appears with the right layout characteristics (paragraphs, name at
end of message separate from main message etc.)

Is there anyway of making it appear this way on the web page, or is this
just a browser specific thing?



Cheers!
-- 
View this message in context: http://www.nabble.com/Maintaining-XML-Layout-tp23037698p23037698.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Maintaining XML Layout

Posted by Johnny X <jo...@gmail.com>.
Pre tag fixed it instantly! 


Thanks!



Shalin Shekhar Mangar wrote:
> 
> On Tue, Apr 14, 2009 at 4:56 PM, Johnny X <jo...@gmail.com>
> wrote:
> 
>>
>> Hey,
>>
>>
>> One of the fields returned from my queries (Content) is essentially the
>> body
>> of an e-mail. However, it's returned as one long stream of text (or at
>> least, that's how it appears on the web page). Viewing the source of the
>> page it appears with the right layout characteristics (paragraphs, name
>> at
>> end of message separate from main message etc.)
>>
>> Is there anyway of making it appear this way on the web page, or is this
>> just a browser specific thing?
>>
>>
> I think you'd need to convert line break characters in the returned string
> into equivalent html tags yourself before displaying. You could also try
> displaying them in a '<pre>' tag and see if it looks ok.
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: http://www.nabble.com/Maintaining-XML-Layout-tp23037698p23038026.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Maintaining XML Layout

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Tue, Apr 14, 2009 at 4:56 PM, Johnny X <jo...@gmail.com> wrote:

>
> Hey,
>
>
> One of the fields returned from my queries (Content) is essentially the
> body
> of an e-mail. However, it's returned as one long stream of text (or at
> least, that's how it appears on the web page). Viewing the source of the
> page it appears with the right layout characteristics (paragraphs, name at
> end of message separate from main message etc.)
>
> Is there anyway of making it appear this way on the web page, or is this
> just a browser specific thing?
>
>
I think you'd need to convert line break characters in the returned string
into equivalent html tags yourself before displaying. You could also try
displaying them in a '<pre>' tag and see if it looks ok.

-- 
Regards,
Shalin Shekhar Mangar.