Skip to content
Thomas Weinert edited this page Dec 15, 2016 · 8 revisions

Loaders

Loaders are used to import data sources into DOM documents. They implement the Loadable interface. FluentDOM\Nodes::load() uses the loaders to provide support for different formats.

FluentDOM 5.2 includes a plugin registration for additional loaders.

Standard Loaders:

XML

(FluentDOM 5.0)

Types: xml, text/xml, application/xml

HTML

(FluentDOM 5.0)

Types: html, text/html

JSON

(FluentDOM 5.0)

Types: json, text/json

Converts Json into a XML optimized for Xpath named JsonDOM. Data that can not be mapped is stored in a separate namespace.

Json Formats

This are loaders for specific Json formats. The formats are used to map XML to Json.

JsonML

(FluentDOM 5.1)

Types: jsonml, application/jsonml, application/jsonml+json

http://www.jsonml.org/

BadgerFish

(FluentDOM 5.1)

Types: badgerfish, application/badgerfish, application/badgerfish+json

http://badgerfish.ning.com/

Rayfish

(FluentDOM 5.1)

Types: rayfish, application/rayfish, application/rayfish+json

http://www.bramstein.com/projects/xsltjson/

PHP Objects

Loaders for specific PHP classes

SimpleXML

(FluentDOM 5.1)

Types: php/simplexml

Basically a wrapper for dom_import_simplexml().

PDO

(FluentDOM 5.1)

Types: php/pdo

Converts the result in a \PDOStatement.

Text

CSV

(FluentDOM 5.2)

Types: text/csv

Converts CSV from different sources into JsonDOM XML.

Clone this wiki locally