Download the PHP package netlogix/xml-processor without Composer

On this page you can find all versions of the php package netlogix/xml-processor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package xml-processor

XML-Processor

PHP XML-Processor based on XMLReader.

The XMLProcessor walks through the XML-file with the \XMLReader and fires events on each node of the \XMLReader. So its ease to process huge XML files with low memory usage.

Events

The following events are available:

Event XMLReader NodeType
event const
react on callback arguments
openFile XmlProcessor::EVENT_OPEN_FILE after open file before first read NodeProcessorContext
endOfFile XmlProcessor::EVENT_END_OF_FILE after last read before close NodeProcessorContext
NodeType_0 \XMLReader::NONE No node type NodeProcessorContext
NodeType_1 \XMLReader::ELEMENT Start element [OpenContext]
NodeType_2 \XMLReader::ATTRIBUTE Attribute node NodeProcessorContext
NodeType_3 \XMLReader::TEXT Text node TextContext
NodeType_4 \XMLReader::CDATA CDATA node NodeProcessorContext
NodeType_5 \XMLReader::ENTITY_REF Entity Reference node NodeProcessorContext
NodeType_6 \XMLReader::ENTITY Entity Declaration node NodeProcessorContext
NodeType_7 \XMLReader::PI Processing Instruction node NodeProcessorContext
NodeType_8 \XMLReader::COMMENT Comment node NodeProcessorContext
NodeType_9 \XMLReader::DOC Document node NodeProcessorContext
NodeType_10 \XMLReader::DOC_TYPE Document Type node NodeProcessorContext
NodeType_11 \XMLReader::DOC_FRAGMENT Document Fragment node NodeProcessorContext
NodeType_12 \XMLReader::NOTATION Notation node NodeProcessorContext
NodeType_13 \XMLReader::WHITESPACE Whitespace node NodeProcessorContext
NodeType_14 \XMLReader::SIGNIFICANT_WHITESPACE Significant Whitespace node NodeProcessorContext
NodeType_15 \XMLReader::END_ELEMENT End Element CloseContext
NodeType_16 \XMLReader::END_ENTITY End Entity NodeProcessorContext
NodeType_17 \XMLReader::XML_DECLARATION XML Declaration node NodeProcessorContext

How to use

To process an XML file, you need to create a nodeProcessor class. It has to implement the NodeProcessorInterface.

Where you can define NodeProcessorInterface::getSubscribedEvents on which events you want to react.

For easier use, you can extend the AbstractNodeProcessor class and implement one of the following interfaces:

Interface description
OpenNodeProcessorInterface To react on opening tags
CloseNodeProcessorInterface To react on closing tags
TextNodeProcessorInterface To react on text between tags

Example

To extract all values of <value> nodes of the following XML:

file.xml

Create a simple nodeProcessor class which collect all values of the <value> nodes.

OpenTestNodeProcessor.php

Create a new instance of the XmlProcessor class and attach the new nodeProcessor.

result:


All versions of xml-processor with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-xmlreader Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package netlogix/xml-processor contains the following files

Loading the files please wait ....