Microformats in Sementic Web

What are Microformats? Microformats are a way of adding simple markup to human-readable data items such as events, contact details or locations, on web pages, so that the information in them can be extracted by software and indexed, searched for, saved, cross-referenced or combined. More technically, they are items of semantic markup, using just standard [...]

Continue Reading →

Dynamic XML document construction with the PHP DOM

When working with XML-based applications, developers often find themselves facing the requirement to generate XML-encoded data structures on the fly. Examples of this include an XML order template based on user input in a Web form, or an XML representation of a server request or client response based on run-time parameters. Although this task might [...]

Continue Reading →

Running XPath queries in PHP

XPath is a language that allows you to address parts of an XML document, making XSLT transformations practically necessary. It also makes it an invaluable tool for managing XML data in applications such as Web applications. Microsoft provides XPath functionality through the selectSingleNode() and selectNodes() methods on DOM nodes and documents. However, PHP uses functions [...]

Continue Reading →

Parsing XML using PHP : Good example

The following example illustrates how to use an external entity reference handler to include and parse other documents, as well as how PIs can be processed, and a way of determining "trust" for PIs containing code. Consider the following XML’s < ?xml version=’1.0′?> < !DOCTYPE chapter SYSTEM "/just/a/test.dtd" [ <!ENTITY plainEntity "FOO entity"> < !ENTITY [...]

Continue Reading →

Parsing XML using PHP

Load an XML file as data using PHP By handling mime-types and using browser detection, CodeHelp has already shown how to export XML using a PHP script. PHP can also receive XML as input – using the XML parser: if (!($fp=@fopen("./contactsbare.xml", "r")))         die ("Couldn’t open XML."); $usercount=0; $userdata=array(); $state=”; if (!($xml_parser = xml_parser_create()))         [...]

Continue Reading →

All about Extensible Markup Language (XML)

Extensible Markup Language (XML) is a general-purpose specification for creating custom markup languages. It is classified as an extensible language because it allows its users to define their own elements. Its primary purpose is to facilitate the sharing of structured data across different information systems, particularly via the Internet, and it is used both to [...]

Continue Reading →