Jump to content

Recommended Posts

Hi,,HAs anyone ever worked on .xml files with many elements in them. 

 

  iam working on an xml project which i will eventually receive a feed from the xml provider ,  but having same issue understanding the process. 

I have a .xml practice file/doc  and its for property on the market..  example below of content ( this is a practice file the feed provider releases to 'help' with set up..)

<?xml version="1.0"?>

-<agency name="Baxters Group" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


-<branches>


-<branch name=" Baxters Bath">


-<properties>


-<property reference="BB00000285">

<availableFrom/>

<department>Agricultural</department>

<propertyofweek>NO</propertyofweek>

<price_text>OIRO £749,950</price_text>

<numeric_price>749950.0000</numeric_price>

<bedrooms>4</bedrooms>

<receptions>2</receptions>

<bathrooms>0</bathrooms>

 

-----------------------

 

 

 

There are literally  a 100 more elements to make up a complete a property... 

DO i actually have to manually create a field name for every element? 

This will take hours and i dont want to do this if the theory is incorrect . 

ALSO a house may have 10 photos or it may have 30 photos...how do i set up the schema to accomodate (pardon pun) all these different elements..

 

i would ask but nothing online goes back to basics..everything assumes the db schema knowledge is normally about 4 elements...  i wish. 

i could just use a plug-in on wordpress but i want to learn this for more unsupported apps i might build. 

thanks

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/307523-replace-database-contents-with-xml-file/
Share on other sites

51 minutes ago, glendango said:

ALSO a house may have 10 photos or it may have 30 photos...how do i set up the schema to accomodate (pardon pun) all these different elements..

It's a table with two fields (house_id/image_name). It's a matter of a house having 10 of those records or 30.

that makes sense... so you might have many tables for an xml file with this many elements..i can feel a plugin coming on?

in this case a table would be

branches, properties, rooms, pictures, floorplans..

 

And do you have to name all the fields in the table by hand or can you use a 'flat file' ??  

i find all the buzz words i just cant piece them together. 

Edited by glendango

.   iam sure what you said is correct.... all the other elements will only have 1 entry..

example 

table 1 Properties 

bullet1

bullet2

bullet3.....   

bullet 10

they are predefined values put in by the user of the crm...

 

Thanks..

DO i still have to manually put the fields in the table in by hand though?   ii could have done it by now tbf but i wanted to see if more speedier way to set up the db..

 

Edited by glendango
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.