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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:32:14+00:00 2026-05-13T07:32:14+00:00

Is this a correct way to store an address in an XML file? If

  • 0

Is this a correct way to store an address in an XML file? If it is, how would I echo it in three lines like an address should be written using PHP. If not what is the correct way? (The file is not complete. I am only interested in the address.)

<store name="Pizza R Us" Store_address="16  Main St Anytown, US 00000">
<items>
 <pizzas>
  <topping>
   <name>Tomato and Cheese</name>
   <price>
    <small>$6.85</small>
    <large>$10.85</large>
   </price>
  </topping>
 </pizzas>
</items>
</store>
  • 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-13T07:32:15+00:00Added an answer on May 13, 2026 at 7:32 am

    In response to storing the address: The recommended way is to not store it as attributes, but you can. It is better to store relevant data in tags rather then as attributes for several reasons. The way you are doing it makes it more difficult to pull out just the street or city for a programmer. It is also harder to read, maintain, and is not as easy to change without breaking existing code.

    For more detailed information read the following page. Especially the sections “My Favorite Way” and “Avoid XML Attributes?”

    http://www.w3schools.com/xml/xml_attributes.asp

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

Sidebar

Related Questions

I'm reading in values from a file which I will store in memory as
How to allocate memory in assembly when using multiple arrays. For instance, I have
I have 2 entities : User, Address. I have set the relationship each User
I am developing a social network from scratch and need to store the user's
I am developing a social network from scratch and need to store the user's
We've been working on implementing timezone support for our Web app. This great SO
Sorry if this is already answered somewhere, but how do i create a foreign
To implement an open hash table in C++, I thought I'd define a vector
I want to start the Maps application from my app. A pin with a
I am new to MYSQL and have a problem. Its related to php too

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.