Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    XML bullet list content

    Hi,

    Is there anyone who can help me out how can i bullet list a part of the XML data. Example below.

    <page pTitle="What Causes Back Pain?">
    Poor posture
    Strenuous activities at home or at work
    Lifting, carrying, pushing or pulling incorrectly
    Standing or bending down for long periods
    Twisting or bending awkwardly
    Sitting in a hunched position for long periods without taking a break
    Muscle tension and or over-stretching
    </page>

    I did try using <li> </li> but to no avail and yet this codes will also display on the Flash textfield.

    Any help would be appreciated.

    Thanks,

    B

  • #2
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    What you want is CSS. Try display: list-item on your page element.

    You can mock it using a <style xmlns="http://www.w3.org/1999/xhtml">...</style> element, but later you'll want to use <?xml-stylesheet ?> to move it to an external file.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #3
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    XML bullet list content

    Hi Alex Vincent,

    Thank you so much for the guide.

    I am a noob in AS3, CSS and XML yet.

    Would really love if you can help out. below is my AS3 and XML code.

    AS3:
    Code:
    var myXML:XML = new XML();
    var XMLURL:String = "medicalcon.xml";
    var myXMLURL:URLRequest = new URLRequest(XMLURL);
    var myLoader:URLLoader = new URLLoader(myXMLURL);
    myLoader.addEventListener("complete", xmlLoaded);
    
    
    
    function xmlLoaded(event:Event):void
    {
    		
    myXML = XML(event.target.data);
    titleText.text=myXML.page[0].@pTitle;
    descText.htmlText=myXML.page[0];
    
    }
    And Below my XML.
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    
    <pages>
    
    <page pTitle="What Causes Back Pain?">
    • Poor posture
    • Strenuous activities at home or at work
    • Lifting, carrying, pushing or pulling incorrectly
    • Standing or bending down for long periods
    • Twisting or bending awkwardly 
    • Sitting in a hunched position for long periods without taking a break
    • Muscle tension and or over-stretching
    </page>
    </pages>
    If you can help out please please? I would appreciate it so much.

    Best,

    BB
    Last edited by Alex Vincent; 08-08-2012 at 06:25 AM. Reason: adding code tags again

  • #4
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    I'm really sorry, but I'm not able to accomodate you on this. Maybe someone else will take up the call?
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #5
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Alex...

    Appreciate it... but maybe some other time if you have

    Thanks again...


    Anyone here can help a poor fellow here

  • #6
    New Coder
    Join Date
    Aug 2012
    Posts
    11
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Please refer to your thread here relating to XML line break:
    http://www.codingforums.com/showthread.php?t=270061

    Is the XML "code" you have inserted into this post your actual code?
    Your sample is not a well formed XML document - you know this right?

  • #7
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    I believe the bullet should be escaped in the XML

    & # 8226; (without the spaces)
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS


  •  

    Posting Permissions

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