Page 1 of 1

Question about XML

Posted: Fri Mar 19, 2010 11:12 pm
by ceaserone
My questions:
I have a website with a few tables, within these tables I want to simply display .xml info Including GFX and text.

how do I call the xml and what are some simple xml calls!?

An example: Zone: ', (!empty($xml->Zone) ? $xml->Zone), ' Zone is where the person lives, within the xml zone for myself would be USA

How would I associate the xml file with my current page, and how would I place the code within the frame to display USA for my zone?
Is my code above correct if I associated the xml it correctly?

Second question:
Can I call or associate the xml from somewhere else? Not on my localhost? or is there some type of security thing that would stop me from doing that?

Would both work? localhost/html/myxml.xml and/or http://some other site.com/myxml.xml ?

Third question:
Is any of this making any sense, did I word it correctly at all?


Thanks guys hope someone can help.

Re: Please help...Im pulling hair out here..

Posted: Sat Mar 20, 2010 1:41 am
by Christopher
First, using a title to your post that does not describe the problem will reduce the chance of getting people to read your post. Everyone here needs help.

Second, writing a lot about how frustrated you are just takes time to read and will reduce the chance of getting people to respond to your post. Be clear, get to the point, show code you have tried.

Third, check the manual for a section about XML. It is here: http://us3.php.net/manual/en/refs.xml.php. If you are looking for a simple solution read through the various extensions. There appears to be one called SimpleXML -- try it: http://us3.php.net/manual/en/book.simplexml.php. There is lots of example code in the manual.

Then if you have problems, come back and show us the code you tried.

Re: Question about XML

Posted: Sat Mar 20, 2010 5:27 pm
by ceaserone
thanks chris...I changed the things mentioned and did think about it when I was typing..

thanks for the reply