A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AS3: White space at the start and end inside a node disappearing

  1. #1
    Slinky Designs slinky2000's Avatar
    Join Date
    Jun 2001
    Location
    Ireland
    Posts
    1,227

    AS3: White space at the start and end inside a node disappearing

    Hi guys, Eg:

    PHP Code:
    var xml:XML = <foo><barhello </bar><barhello </bar></foo>;
    trace(xml.toXMLString()); 
    I get this:

    PHP Code:
    <foo>
      <
    bar>hello</bar>
      <
    bar>hello</bar>
    </
    foo
    Why are the spaces disappearing? Is there any setting for this? I need this because in the xml I have E.g:

    PHP Code:
    <text>
      <
    b>hello </b>
      <
    u>my name is </u>
      
    John
    </foo
    and I format this "xml" into into a custom flow element for the new Text Layout Framework. Only problem I have is the spaces are disappearing!

    I can't use

    PHP Code:
    XML.ignoreWhitespace false
    because all the other white space gets into my elements
    Last edited by slinky2000; 02-23-2010 at 07:34 AM.

  2. #2
    Slinky Designs slinky2000's Avatar
    Join Date
    Jun 2001
    Location
    Ireland
    Posts
    1,227
    looks like its a verified bug even using cdata tags:

    http://bugs.adobe.com/jira/browse/AS...3Aall-tabpanel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center