Priti's Technical Corner

October 29, 2008

XML Questions

Filed under: XML — Tags: , , — pritisolanki @ 8:35 am

Question 1: what is CDATA?
Answer 1: CDATA stands for “character data”. The string kept in CDATA in XML will not be parsed by parser. It will simply be considered as string.


<![CDATA[You & Me]]>

Question 2: What is Tree based and DOM based parsers.
Answer 2:

Tree Based Parser

1.XML Data is treated as tree based structure. In term of nodes

2.It store the complete XML structure in memory

3.It can validate your XML data.

4.DOM based parsers are document-centric. i.e. when your intention is complete XML.

5.DOM based parser is suitable for xml data to be read repeatedly or out of sequence order.

Event Based Parser.

1.Event Based parser are those parsers which sees XML data as series of event like opening element, closing element , access node etc.

2.It cann’t validate your data as event-based parser does not load whole data in memory.

3.It loads part of the XML data into memory

4.Event-based parser is suitable for sequential parsing of document

5.Faster then Tree based

Question 3: Which ext you will use in PHP 5 for implementing tree based parser?
Answer 3 :DOMDocument or SimpleXML.

Question 4: What is SimpleXML in php5?
Answer   4: SimpleXML extension provide a easy way to convert XML to an object that can be processed with normal property selectors and array iterators.


October 10, 2008

PHP Interview Questions

Filed under: PHP, Zend PHP 5.3 — Tags: , , , — pritisolanki @ 11:26 am

Questions : which mysql data type you use for storing images.
Answers: BLOB (Images are stored as binary in mysql).

Question:How you will decrypt the password using md5();
Answer:You cann’y decrypt using md5 function because it is 1-way encryption algorithm.

Question:Name other1-way encryption algorithm.

Question:list types of joins in mysql.
Answer:Inner join,Left outer join and right outer join.

Question:What is difference between mysql_connect and mysql_pconnect.
mysql_connect : The connection object is created on every request and destroyed once the request is completed.
mysql_pconnect: pconnect stands for persistence connection. i.e when the connection object is release it is not destroyed rather it is kept in pool for other request to use.

Create a free website or blog at

%d bloggers like this: