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

  • Home
  • SEARCH
  • 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 6094317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:39:49+00:00 2026-05-23T12:39:49+00:00

I am currently writing a Chrome extension whose basic function is to serve as

  • 0

I am currently writing a Chrome extension whose basic function is to serve as a quick selection tool. What this means is that I am working with a file classification interface implemented through an ASP.NET web site and I have to select particular values (such as the date, description, tags, etc.) describing a particular file when I upload it. So, I have decided to use Chrome’s developpement tools to build an easy to use context menu (you just have to right click on the page) that presents a list of pre-defined rules that, when clicked, fill out all the appropriate fields (text boxes, drop down list, etc) on the page automatically.

The thing is that there’s a lot of these pre-defined rules and they are prone to change and most of them have children nodes (ex: rules 1 contain 1.1, 1.2, etc.), which kinda makes it difficult to code directly in script form. Therefore, my idea was to include the definitions in a separate file, like an XML document, and simply populate the context menus with the extracted data. Only I’ve tried many different methods and none of them worked. Isn’t it possible to have this XML file in the extension folder and simply access it ? If so, what would the code calling it look like ? Can I even interact with this kind of local resource from within a Chrome extension ? Any input is welcome.

Example:

// This is the parent "general" section
var general = chrome.contextMenus.create({ "title": "General" });

 // Here, there would be a loop iterating through the "general" division of the XML,
 // creating the sub-menus (general_item1, general_item2, etc).
  • 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-23T12:39:49+00:00Added an answer on May 23, 2026 at 12:39 pm

    You can load it through XMLHttpRequest and parse it with jquery for example:

    $.ajax({
        url: "include.xml",
        dataType: "xml",
        success: function(xml) {
            $(xml).find("entry").each(function(){
                //loop through children
                $(this).children("subentry").each(function(){
                    console.log($(this).attr("param"));
                });
            });
        }
    });
    

    But I would go with what Jim Schubert suggested in comments – just include js file that contains all those settings in some sort of object ready to use. There is no need in converting XML to javascript if you can just store everything as javascript object in the first place.

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

Sidebar

Related Questions

I am writing a chrome extension that change part of the url in the
I'm writing a Chrome extension that works with a website that uses ISO-8859-1. Just
I'm writing a Chrome extension, and want to write one JS file, that provides
I am currently writing a quick script in Ruby that goes through all the
I'm writing a Chrome browser extension that takes a snapshot of the current tab's
Our company is currently writing a GUI automation testing tool for compact framework applications.
I am currently writing a simple, timer-based mini app in C# that performs an
I'm currently writing a TYPO3 extension which is configured with a list of tt_content
I am currently writing a little bootstrap code for a service that can be
I am currently writing an application that needs to pull data from an XHTML

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.