Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3662664
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:26:32+00:00 2026-05-19T01:26:32+00:00

tl:dr How can I populate jsTree based on a folder location instead of an

  • 0

tl:dr How can I populate jsTree based on a folder location instead of an exact XML url?

I’m looking for a little direction on this project.

Currently I am trying to copy file structures of hard drives as XML files and recreate them using jsTree on the webserver for a completely independent version of the file structure. I have some python script that outputs XML files that are formed to jsTree and automatically uploads to a folder on the server. The problem is now I am a little lost because I have to manually enter each XML file into jsTree code for it to display so I have multiple entries like this:

 $("#tree1")
   .jstree({ 
       "plugins" : [ "themes", "xml_data", "ui", "search", "types" ],
        "xml_data" : {      
            "ajax" : {
                "url" : "./XML_DATA/DRIVE1.xml"
                     },
                        "xsl" : "nest" 
                     },

I see in the documentation that instead of populated by the direct file the folders are populated by “server.php” but no where in the php code does it point to any directories or files. After considering the problem I thought of a few solutions and could use some advice on them:

Should I be trying to write php code to automatically look through my XML_DATA folder to upload each XML file? Should I just upload all the XML to mySQL and populate my tree based on that? Should the javascript be the code looking through the server’s folder for XML files?

All the XML is formed the same way but the number of XML files on the server will increase and will have to be refreshed as well as they will be overwritten with changes.
Any direction would be appreciated, thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:26:32+00:00Added an answer on May 19, 2026 at 1:26 am

    What functions of jstree are you trying to use?

    If you’re just wanting to have an expandable tree matching what’s on your filesystem. Then you can either point to a php page that reads your file structure and outputs an <UL><LI> based tree and then apply jstree to it.

    But since it sounds like you already wrote the XML generator in python, why not just add python support to your webserver, and serve up that XML file to the jstree instance?

    The last worst option is to simply point to the generated XML file on your webserver. You won’t have any dynamic abillity, but you’ll get the XML file in jstree.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I do this in Javascript/jQuery from PHP? I am trying to populate
I want to be able to run a little script that I can populate
I have a form which can populate from 1-100 elements based on a user's
is their a way that we can populate pie chart dynamically.... that based on
I'm trying to sort this object by the score value so I can populate
Can you populate a set from a soql query? I couldn't get my syntax
How can I populate multiple datagrids in flex with a single datasource that is
How can i populate an array in loop? I'd like to do something like
How can I get the variable My.Application.Info.Version.ToString to populate in the comments section? Dim
I have a requirement where I can use JS Fiddle dropdown to populate States

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.