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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    indentation of XML hierarchy --Please help

    Hi Experts,

    I have a requirement where I need to place the elements in the following fashion
    Code:
    <p>Tree</p>
                 <p>Branches</p>
                  <p>Fruit</p>
                              <p>Flowers</p>
    Now how can I place this inside an XML file to maintain the same hierarchy, It should appear in the same fashion as has been bolded. The XML parses further and gets converted into an HTML and it again appears in the fashion as below. It appears in the straight vertical line. Is there any special code I need to use in my XML to get it indentation of the XML hierarchy??When I try using the <p></p> tag it looks like the following which is not correct:-

    Tree
    Branches
    Fruit
    Flowers


    Pic-2

    Kindly suggest on how can I approach this , I tried many ways but it is not showing up

    Kind Regards
    Deb

  • #2
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    We need more info. How are you presenting the XML to the end-user?
    "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
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Alex Vincent View Post
    We need more info. How are you presenting the XML to the end-user?
    Hi Alex ,

    Thankyou for replying. The final version is in .html ,there is a specific tool where the XML gets converted to html page and it is displayed then to the enduser.

    So whatever changes I do to the XML is shown up in the final html page.

  • #4
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    Okay... what is that tool? What XML do you have, and what code does the transformation?
    "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


  •  

    Posting Permissions

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