Thanks Geoff.
I'm not writing the XML, I'm using TXMLDocument, IXMLNode
etc
eg Node.Text := 'text'.
It doesn't just work for me. If I go
Node.Text := Memo1.Lines
Memo1.Lines := Node.Text
I get unprintable characters for line breaks, see my reply
to Grahame,
fixable by going
Memo1.Lines := AdjustLineBreaks( Node.Text );
Don
igt wrote:
>I have been using XML seriously for several years now. I
use XML Document
>together with many memo/TStrings type components. I have
never had the
>slightest problem loading/saving multiline text. I use
the XML Binding
>Wizard with D7. Using Memo1.Lines.Text just works.
>Snippet
><Cause>
>Exposure to Dust
>Exposure to Explosive Fumes
>Inadequate Ventilation
>Poor Ground Conditions
>Poor Road Conditions
>Struck by Falling Object
></Cause>
>
>How are you writing the XML? Is it coming from a String
List or a memo or
>are you writing it line by line?
>
>Geoff
>
>
>
>-----Original Message-----
>From: Don Macrae [mailto:don xpro.com.au]
>Sent: Thursday, 11 May 2006 1:12 PM
>To: ADUG Members List
>Subject: [ADUG] Line breaks in XML
>
>Hi Delves..
>
>Slightly OT I guess, but..
>
>I need to save multiline text in an XML document and
retrieve it.
>I am using TXMLDocument in D7.
>Line breaks seem to be an issue.
>
>For a test, I have a line of text 'One', a blank line
and then another
>line, 'Three'.
>Between the 'One' and the 'Three' are to CRLF's, ie
0D 0A 0D 0A.
>
>However, in the saved XML I get, instead of each CRLF,

, ie 26 23
>78 41 3B
>
>When I retrieve it, for the two line breaks I get
'#$A#$A', ie 27 23 24
>41 27
>
>I don't want to do a silly workaround really. What's
the correct
>approach, anyone?
>
>Don
>
>
>
>
--
----------------------------------------------------------
Don Macrae, Excellent Programming Company
mailto:don xpro.com.au
----------------------------------------------------------
--
ADUG Members List
Post: adug-members adug.org.au
Unsubscribe/Options: http://lists.adug.org.au/mailman/options/a
dug-members/bond%40yahoo.com
Archives: http://lists.adug.org.au/mailman/private/adug-members
|