Title: RE: [dom4j-user] How to avoid trimming of spaces in text
Hi,
   I am using 1.3 version of Dom4j.
  Here is the part of code i am using.some values are harcoded here
 
    String elementName = "LINE";   
    String elementValue = " MODELCNTCTR";   
    ((Element)parentElement.addElement(elementName).addText(elementValue);
 
    When i use  the above code and get the element tag it displays  <LINE>MODELCNTCTR</LINE>   without any spaces
 
Thanks
Balaji
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Wannheden, Knut
Sent: Wednesday, April 02, 2003 9:58 AM
To: [EMAIL PROTECTED]
Subject: RE: [dom4j-user] How to avoid trimming of spaces in text

Balaji,

That should certainly not be the case.  Can you show some code which demonstrates the problem?  And what version of dom4j are you using?

Regards,

--
knut

> -----Original Message-----
> From: Balaji Varatharaj [mailto:[EMAIL PROTECTED]]
> Sent: Mittwoch, 2. April 2003 16:41
> To: [EMAIL PROTECTED]
> Subject: [dom4j-user] How to avoid trimming of spaces in text
>
>
> Hi ,
>       I am adding a text to an Element with the leading
> spaces..for example "
> command".But the space in front of " command" is trimmed
> while adding to an
> Element.
> So the final Element tag i am getting is <LINE>command</LINE>
> instead of
> <Line> command</LINE>
>
> How to add spaces in text that will be preserved in the Element?
> Any ideas?
>
>
> Thanks
> Balaji
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>

Reply via email to