Skip to main content
Participant
Sep 15, 2009 11:17 AM UTC
Question

Problem with whitespace then loading and saving xml

i do not know how to handle this problem. i modifed a texteditor to send XML to a server and load XML back to the container.

but then i do changes to the Textlayout it shows up like this --->

Text in Container not modifed

Text in Container modifed ---> with space beween the colorchanged string

Text inContainersend and loaded ---> i think this has something to to with the

TextFilter.export(_textFlow,TextFilter.TEXT_LAYOUT_FORMAT,ConversionType.XML_TYPE)

can someone give me a hint...

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Participating Frequently
Sep 16, 2009 10:52 AM UTC

Hi,

Are you at any point converting XML to String? If so, you will need to set XML.ignoreWhitespace to false before doing the coversion. Better still, try exporting to String using ConversionType.STRING_TYPE.

Hope this helps.

Abhishek

(Adobe Systems Inc.)

Translate
micha_sprAuthor
Participant
Sep 16, 2009 5:31 PM UTC

hi,i solved the problem but i have a have another problem with the TextLineFactory class . With the composer it works perfect but i cannot render picture from my XML with the textlinefactory. I hope where is a solution to it. The XML also do not pass the colum count and the gaps properly.(also in the composer.)here is a link.--->

composer --->http://www.horstmann-architekten.de/contentmanagment/SimpleEditor.html

linefactory--->http://www.horstmann-architekten.de/contentmanagment/viewer.html

thanks in advance

Michael Sprinzl

--- abhishek.g <forums@adobe.com> schrieb am Mi, 16.9.2009:

Von: abhishek.g <forums@adobe.com>

Betreff: Problem with  whitespace  then loading and saving xml

An: "Michael sprinzl" <mi_sprinzl@yahoo.de>

Datum: Mittwoch, 16. September 2009, 12:52

Hi,

 

Are you at any point converting XML to String? If so, you will need to set XML.ignoreWhitespace to false before doing the coversion. Better still, try exporting to String using ConversionType.STRING_TYPE.

 

Hope this helps.

 

Abhishek

(Adobe Systems Inc.)

Translate
Adobe Employee
Sep 17, 2009 12:12 AM UTC

Sounds like you have two different issues going on: (1) inline graphics aren't coming out correctly when you use the TextLineFactory, and (2) columns aren't working correctly. It's difficult for me to tell by looking at the application you link what is going wrong. One of the examples does seem to have columns working -- can you be more specific about what you're doing, and what results you are seeing? As for the inline graphics, there is a timing issue involved with using URLs, due to the asynchronous loading. See this comment in the docs for TextFlowTextLineFactory:

Note: When using inline graphics, the source property of the InlineGraphicElement object   must either be an instance of a DisplayObject or a Class object representing an embedded asset.   URLRequest objects cannot be used. The width and height of the inline graphic at the time the line   is created is used to compose the flow.


- robin

Translate