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 6973711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:08:34+00:00 2026-05-27T17:08:34+00:00

If I enter http://localhost/sitename?filter=city I would like to display all the cities in xml

  • 0

If I enter http://localhost/sitename?filter=city I would like to display all the cities in xml format

I would like the xml display in tag format like this

<city>
   <navi mumbai>
   <pune>
</city>
  • 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-27T17:08:35+00:00Added an answer on May 27, 2026 at 5:08 pm

    Here is sample php code , run this code with your link as filter as your condition

        Header("Content-type: text/xml"); 
        // get query string params
        $filter = $_GET['filter'];
    
        $xml = '';
    
        If ($filter == "city"){
            $xml = $xml . '<continent name="city">';
            $xml = $xml . '<city id="1">Navi Mumbai</city>';
            $xml = $xml . '<city id="2">Thane</city>';
            $xml = $xml . '<city id="3">Pune</city>';
            $xml = $xml . '</continent>';
        }else If ($filter == "country"){
            $xml = $xml . '<continent name="country">';
            $xml = $xml . '<country id="100">India</country>';
            $xml = $xml . '</continent>';
        }else If ($filter == "state"){
            $xml = $xml . '<continent name="state">';
            $xml = $xml . '<state id="300">Maharastra</state>';
            $xml = $xml . '</continent>';
        }else{
            $xml = $xml . '<continent name="none">';
            $xml = $xml . '<country id="0">no result found</country>';
            $xml = $xml . '</continent>';
        }
    
        // send xml to client
        echo( $xml );
    ?>
    

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

Sidebar

Related Questions

I have the following url structure: http://localhost/sitename/views/www/page.php I would like for page.php to show
When I enter ' http://localhost:8983/solr/select/?q=body:hello ` in the URL field I get all the
Hi everyone i have a problem like this. For example im in http://localhost/Search.aspx I
in this page http://api.jquery.com/category/effects/ when you put 'up'(keyboard) and 'down',then put 'enter',it will go
How can I translate an URL like: http://localhost/mySite/?link=OFFERS&sublink=ARTICLE&subsublink=DETAIL to: http://localhost/mySite/OFFERS/ARTICLE/DETAIL if one parameter is
I start glassfish with ~/.glassfish/bin/asadmin start-domain domain1 Everything works perfect. I enter to http://localhost:8080
I have a topLevel folder with a subFolder holding ControllerName. When I enter: http://localhost/FolderName/FolderName/ControllerName
I can enter via web http://localhost:8080/tfs/web with any user, from remote or local, but
When I enter search url http://localhost:8983/solr/select?qt=standard&rows=10&q=*:* I get a response with 10 documents. But
I have this long url, which I don't want: http://localhost:56563/TablesLibraryWebsite/searchresults.aspx?__VIEWSTATE=%2FwEPDwUKMTY3OTkxNDkxMWQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFI2N0bDAwJGNwaFJpZ2h0UGFuZWwka2V5d29yZFNlYXJjaEdP&__EVENTVALIDATION=%2FwEWAgLoquEjAvXq39ML&type=search&keywords=Enter+keywords+%2F+publication+number&population=0&datasources=0&year=0&ctl00%24cphRightPanel%24keywordSearchGO.x=3&ctl00%24cphRightPanel%24keywordSearchGO.y=8 My form is declared

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.