TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Can anyone tell me what this is doing? (http://www.talkphp.com/general/5885-can-anyone-tell-me-what-doing.html)

buildakicker 06-15-2011 04:37 PM

Can anyone tell me what this is doing?
 
I don't understand the $indexXML->document->document

Code:

        foreach($indexXML->document->document as $doc) {
                    if(strcmp($doc->DocumentKey[0]->tagData, $docType) == 0) {
                        $viewMapping = $doc;
                        $viewXMLFile = $doc->ViewXML[0]->tagData;
                        break;
                        }

Thanks!

Wildhoney 06-21-2011 06:16 AM

It's basically traversing an XML file that has nested document nodes. Something like the following:

Code:

<document>
<document>
...Rest of the XML file.

I hope this helps you, my friend! :-)


All times are GMT. The time now is 10:36 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0