Question about XML

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ceaserone
Forum Newbie
Posts: 3
Joined: Fri Jun 09, 2006 2:13 pm

Question about XML

Post 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.
Last edited by ceaserone on Sat Mar 20, 2010 5:26 pm, edited 1 time in total.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

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

Post 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.
(#10850)
ceaserone
Forum Newbie
Posts: 3
Joined: Fri Jun 09, 2006 2:13 pm

Re: Question about XML

Post by ceaserone »

thanks chris...I changed the things mentioned and did think about it when I was typing..

thanks for the reply
Post Reply