Displaying Star Rating using CSS Sprites

Recently, I have been working on an Application which involved rating system. There are 2 cases where we would want to display ratings. On 1st case, we would just want to display the list of contents (videos, blogs etc.) with its rating (just displayed). On another case, show the rating and also allow viewer to […]

Continue reading →

PHP DomXPath: Read Complex XML files easily.

XPath allows traversing through XML elements and attributes very easily. For complex XMLs, using XPath can significantly reduce the complexity of coding. Good Tutorial of XPath can be viewed on W3C schools here. Reference on DomXPath can be viewed here. XPath is useful if someone needs to extract a specific node from an entire XML, […]

Continue reading →

PHP Shipping Modules (Canada Post)

Over the last month I have been working on an e-commerce store for our company and realized most of the shipping modules out there are quite complex to use. So, I decided to create a simple Canada Post PHP Class. Canada Post’s specification requires parsing of XML files to retrieve values, hence I have used […]

Continue reading →

PHP 5 DOM and XMLReader: Reading XML with Namespace (Part 1)

PHP-5’s DOM and XMLReader provides the ability to read XML files easily. The good thing about PHP-5’s DOM (mainly DomDocument, DomNodeList, DomNode) is that it implements the standard DOM features as specified by W3C. W3C’s reference on DOM can be viewed here. So, if someone has used DOM before (say on JavaScript), then it would […]

Continue reading →

PHP-5 DomDocument: Creating a Basic XML

DomDocument is a powerful library of PHP-5 to create XML. In this article, I will try to explain the basics of DomDocument and then will create a couple of simple XML files. First, lets have a look at a simple XML file: Taken from W3C’s example: <?xml version=”1.0″ encoding=”ISO-8859-1″?> >note> <to>Tove>/to> <from>Jani>/from> <heading>Reminder>/heading> <desc>Don’t forget […]

Continue reading →