BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
PHP XML
Simple XSLT transformation with PHP 4.1.0 and Sablotron
 
 

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/19/2008
Times viewed :5394

 

PHP SimpleXML Introduction

The SimpleXML extension of PHP provides set of functions to convert XML to an object that can be processed with normal property selectors and array iterators. Support for SimpleXML in PHP5 is automatically turned on; there is no need to include any additional extensions.

It includes functions for working with XML documents that make common operations fairly easy, such as the ability to take a String and convert it to an XML formatted document and display it. The primary advantage is that the XML document becomes an object that can be processed like other objects in PHP, with elements, attributes, and their data accessible using normal object operations.

The functions include:

  • simplexml_load_file: this function takes a file path as an argument, and if the contents of the file are well-formed XML will load the contents as an object.
  • simplexml_load_string: this function takes a string as an argument, and the string should be well-formed XML. Converts the string to an object.
  • simplexml_import_dom: this function takes a node from a DOM (Document Object Model) document and turns it into a simple xml node.
  • simplexml_element -> asXML: this function returns a well-formed XML string from a simpleXML object.
  • Simplexml_element -> attributes: this function provides the attributes and values defined within a well-formed string of XML.
  • simplexml_element -> children:this function provides the child element of an element.
  • simplexml_element -> xpath: this function runs an XPATH query on a simpleXML node.

Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Integration Specialist Needed - Wor
Virtualization Server Infrastructur
A great opportunity to Digital Vide
here is a greate opportunity as a S
A great opportunity as a Network En

View all Jobs (Add yours)
View all CV (Add yours)



Information Online

swimming pool builder
chicago web site design
spfxmasks
Cheap Web Hosting
conference calling
Versace sunglasses
answering service


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP