E
E
Egor Ogurtsov2014-01-30 14:06:19
PHP
Egor Ogurtsov, 2014-01-30 14:06:19

How to save a list of streets and houses in XML to synchronize data on the site and in the desktop application?

There is a task to save a list of streets and houses in XML to synchronize data on the site and in the desktop application.
Such a structure comes to mind, but I doubt whether identifiers are needed for houses, or can they be obtained by a list by street ID?

<?xml version="1.0"?>
<streets>
  <street id="01">
    <streetname>ул. Иванова</streetname>
    <houses>
      <house>4</house>
      <house>31</house>
      <house>57</house>
    </houses>
  </street>
  <street id="02">
    <streetname>ул. Петрова</streetname>
    <houses>
      <house>3</house>
      <house>43</house>
      <house>65</house>
    </houses>
  </street>
</streets>

Then I’ll ask one more question, how to parse all this in php.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vit, 2014-01-30
@mrdubz

how to parse all this in php :)

SimpleXML
Do it the way you feel most comfortable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question