Search code examples
androidxmlurl

Creating a URL with XML


I've searched and searched and can't seem to find any tutorial on how to write my own webpage that is strictly XML. This is the sort of thing I want to create myself. I'm not too advanced of an XML or webpage writer, but does anyone have any ideas/tutorials?

P.S. I want to do this because I'm writing an android app that needs to pull information from this XML file. A local XML file is not a solution. A requirement for this app is that the XML needs to be online.

P.S.S. Here's a small sample of what I'd like to write to a URL:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- Phone Numbers Set 1 -->
    <string name="police1_phone">555-555-5555</string>
    <string name="police2_phone">555-555-5555</string>
    <string name="police3_phone">555-555-5555</string>
    <string name="police4_phone">555-555-5555</string>
    <string name="police5_phone">555-555-5555</string>

    <!-- Phone Numbers Set 2 -->
    <string name="fire1_phone">555-555-5555</string>
    <string name="fire2_phone">555-555-5555</string>
</resources>

Solution

  • You didn't find any tutorial because you're mixing things here. An URL is an Universal Resouce Locator, which means it can point to anything (not just HTML files). Just put your XML in your server and use the path as URL, it will be fine.

    If you need any more clarifications, just let me know