MagicParser PHP script

SPONSORED LINKS

    Specification

  • Version:
  • File size: 0 KB
  • File name:
  • Last update:
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • Language: PHP
  • Price:Commercial License (
  • Company: David Morison (View more)

MagicParser script description:




Publisher review:
MagicParser parses just about any XML or CSV variant (comma, tab, pipe separated values etc.) text file in PHP, ideal for parsing affiliate product feeds, syndication feeds (RSS, Atom etc.), SOAP envelopes and responses documents from XML. MagicParser parses just about any XML or CSV variant (comma, tab, pipe separated values etc.) text file in PHP, ideal for parsing affiliate product feeds, syndication feeds (RSS, Atom etc.), SOAP envelopes and responses documents from XML.

MagicParser_parse() reads and parses filename, calling the user specified function record_handler for every record in the file, or until record_handler returns a non-zero value.

MagicParser_parse() will attempt to automatically detect the file type and data representation format unless this feature is overridden by the optional 3rd paramater format.

filename can be anything that would be used with PHP's fopen() function, including Internet URLs if URL wrappers are enabled.

record_handler is the name of a user defined function that will be called for each record in the file with a single parameter containing the current record as an associative array.

For XML files, the key values contain a simple path style expression indicating the name of the element. Key values for element attributes have the attribute name appended by a hyphen.

Potential duplicate key values are resolved by appending @1,@2 .. @n to the element name. For CSV files with a header row, key values are the field names contained in the header row.

For CSV files with no header row, key values are FIELD1,FIELD2 .. FIELDn. If record_handler returns a non-zero value Magic Parser will stop reading the file.

format (optional) contains a string that describes the file type and other data representation parameters, thus avoiding the autodetection phase of the parse function.
MagicParser is a PHP script for Development Tools scripts design by David Morison. It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.

Operating system:
Windows / Linux / Mac OS / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5