Workshop


The workshop is designed to help you anticipate possible questions, review what you've learned, and begin putting your knowledge into practice.

Quiz

1.

What should be the opening line of a valid XML document?

2.

Does the following code put your XML content into a new DOM document?

$dom = new DomDocument;


3.

What code would be used to load the contents of a file called my.xml into a SimpleXML object called $myData?

Answers

1.

<?xml version="1.0">


2.

No, it just creates a DOM document referenced as $dom. To load the content you must also use something like:

$dom->load("books.xml");


3.

$myData = simplexml_load_File("my.xml");





Sams Teach Yourself PHP, MySQL And Apache All in One
Sams Teach Yourself PHP, MySQL and Apache All in One (3rd Edition)
ISBN: 0672328739
EAN: 2147483647
Year: 2004
Pages: 327

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net