slevin741 Posted February 19, 2015 Share Posted February 19, 2015 (edited) Hello to all,I finished a web developing course and had about 16 tests to take. i have passed them all and have about 5 left that I cannot answer and score only about 30%.The questions seem ambiguous and the answers even more confusing. The tests are on some paste website you just have to press ctrl-d to edit and ctrl-s to save.If someone could help I'd appreciate it maybe even give a reward. http://hastebin.com/evupilaxum.coffee http://hastebin.com/fobojebuyo.coffee http://hastebin.com/ubegejanuw.lua http://hastebin.com/ibinokenem.coffee Edited February 19, 2015 by slevin741 Quote Link to comment https://forums.phpfreaks.com/topic/294720-help-with-oop-final-tests/ Share on other sites More sharing options...
requinix Posted February 19, 2015 Share Posted February 19, 2015 (edited) There's 38 questions total. Which ones were you unsure about? [edit] These questions aren't written very well... [edit 2] Ah, you mean to edit this stuff so it makes sense? Alright... Edited February 19, 2015 by requinix Quote Link to comment https://forums.phpfreaks.com/topic/294720-help-with-oop-final-tests/#findComment-1506116 Share on other sites More sharing options...
requinix Posted February 19, 2015 Share Posted February 19, 2015 (edited) That took a long time. Here's the first one, I need to go to bed. XML 1. In SimpleXML, what are the four basic rules for how an XML document is accessed? (Four answers.) a. Properties are [elements, or more precisely,] element iterators b. Numeric indexes are elements c. Non-numeric indexes are element attributes d. Converting an element to a string gets its text data e. Element namespaces are denoted by the ‘namespace’ attribute 2. SimpleXML objects can be created *directly* from what types of data sources? (Three answers. Yes, three.) a. A database resource b. A URI c. A DOMDocument object d. An array e. A string 3. What is the primary benefit of an XML reader based on SimpleXML compared to one based on the DOM classes? (Not a very good question.) a. All of the specified options b. Easier to develop a reader c. Requires less memory than DOM e. Faster than DOM methods 4. Event-based XML parsing is an example of which parsing model? (I have no idea what this is asking about.) a. XQuery b. XPath c. XML object naming d. DOM e. SAX 5. PHP 5 supports which of the following XML parsing/reading methods out-of-the-box? (Two or three answers, depending how you consider it.) a. XPath b. DOM c. FastDOM d. SimpleXMLElement 6. Which of the following will display the HREF attribute? (One answer.) $sxml = simplexml_load_string('<html><body><h1>please go <a href = "http://yahoo.com"> http://yahoo.com</a></h1></body></html>'); a. echo $sxml->body->h1->a['href']; b. echo $sxml->body->h1->a<href>; c. echo $sxml->h1->a->href; d. echo $sxml->body->h1->a->href; 7. What XML technology can be used to combine two XML documents in one? (One answer.) a. Namespaces b. Transformations c. DTD d. Validators 8. Replace the ???? to print "hello world" - with no leading/trailing whitespace or markup. (Probably one answer - I would have to check myself.) $xmldata = ' <?xml version="1.0" encoding="utf-8"?> <html> <body> <p> <b>hello world</b> </p> </body> </html> '; $sxe = simplexml_load_string($xmldata); $p = $sxe->body->p; $string = // ??????? print $string; a. strip_tags(($p->asXML())) b. trim(($p->asXML())) c. trim(strip_tags(($p->asXML()))) d. trim(strip_tags(($p->asText()))) e. trim(($p[1])) 9. Creating new nodes in XML documents using PHP can be done using...? (Two answers.) a. DOM b. SimpleXML c. XPath d. XQuery Edited February 23, 2015 by requinix 1/howtf does one post plain text? 2/found a way Quote Link to comment https://forums.phpfreaks.com/topic/294720-help-with-oop-final-tests/#findComment-1506118 Share on other sites More sharing options...
slevin741 Posted February 23, 2015 Author Share Posted February 23, 2015 Thanks alot for you're reply.The questions are exactly as on my online testing platform. Quote Link to comment https://forums.phpfreaks.com/topic/294720-help-with-oop-final-tests/#findComment-1506532 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.