Insert break in XML document

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Insert break in XML document

    Is there any way to insert a break <br> in xml document as in html? If no is there any other way to insert a new line when send a node value in Flash?
    johnny_XP Guest

  2. Similar Questions and Discussions

    1. Create New Document from Insert Bar
      I'm trying to develop a small suite of tools that will be run from a group in the Insert Bar. I have a command that works OK from the 'Commands'...
    2. BIG document insert to database problem
      Hello. I have this BIG problem, have tampered with this for weeks now. I try to insert a record to an Access database (memo-field). Everything works...
    3. How do I break a large document into smaller documents
      Hi, Using InDesign cs, if I have one document that is 200 pages long and I would like to break it into separate chapters and then recombine it into...
    4. Insert Word Document
      I'm having trouble trying to insert a Word document onto a page. I would like to have the document (a testimonial letter), appear exactly at the...
    5. Document, Pages, Insert
      OS = Windows 2000 Pro; Dell Pentium 4; 512 MB memory using Adobe Acrobat 6 I want to insert multiple pdf documents as a group into a single...
  3. #2

    Default Re: Insert break in XML document

    johnny_XP wrote:
    > Is there any way to insert a break <br> in xml document as in html? If no is there any other way to insert a new line when send a node value in Flash?
    for node values (*not* attributes), you can wrap it in CDATA tags and
    then happily stick html tags of any kind in there.
    If you don't use CDATA, you can still make it work with HTML tags, but
    each tag will be treated as a separate node which is a real pain.

    sample data:
    <textContent><![CDATA[ However, you’re not alone - Marwan has beaten you
    to it! He’s been in his office for an hour or so, and has sent you an
    email regarding what’s going to be discussed at the meeting. Click
    <b>Message</b> to read it.<br/><br/>When you&apos;re ready to continue,
    click <b>Next</b>.]]></textContent>
    --
    MOLOKO
    ------------------------------------------------
    ::remove _underwear_ to reply::
    'God saves but Buddha makes incremental backups'
    ------------------------------------------------
    GCM/CS/IT/MC d-- S++:- a- C++ U--- P+ L++ !E W+++$ N++ O? K+ w+++$ !O M+
    VMS? PS+++ PE- Y PGP+ t+ 5-- X-- R* tv++ b++++ DI++++ D+ G e h-- r+ y++
    see [url]www.geekcode.com[/url] to translate the above!
    MOLOKO Guest

  4. #3

    Default Re: Insert break in XML document

    Thanks for the answers. Lets be more concrete. I have an xml document like this

    <xml
    <news
    <date>20/2/2004</date
    <title>Site Update</title
    <contents>Here the contents that will be displayed in a text box component
    etc....</contents
    </news
    </xml

    I have a function that reads the xml when laods

    function xmlReader()
    var jmax:Number
    var xmlContents = new Array()

    for(var i=0; i<xmlDoc_xml.firstChild.childNodes.length; i++)
    jmax = xmlDoc_xml.firstChild.childNodes[i].childNodes.length
    xmlContents[i] = new Array(jmax)
    for(var j=0; j<jmax; j++)
    xmlContents[i][j] =
    xmlDoc_xml.firstChild.childNodes[i].childNodes[j].firstChild.nodeValue



    //Send the array to a handle
    _parent.onXMLLoad(xmlContents)
    delete xmlContents
    removeMovieClip(eval(this))


    So the problem is how to insert a new line in the <contents> tag so when the
    value passed in the array and send to the text box the new line appear

    JLBE Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139