Skip to content

Simple merge from an array of file #2

@cedric-marcoux

Description

@cedric-marcoux

Hello,

thanks for this great job!
I'm trying to do a simple task without success, i simply try to merge xml from an array of files fectched from this command:
$fileList = glob('APPLOCK_*.xml');

I have try to get inspiration from example without success, could you please provide an example on how to achieve this and save it to mergerd.xml?

Thank you and have a nice day

Current not working code

<?php
	require 'mergexml.php';    /* load the class */
	$filelist = glob('APPLOCK_*.xml');
	print_r($filelist);
	$oMX = new MergeXML(['updn'=>true]);
	foreach($filelist as $filename){
		if(is_file($filename)){
			$oMX->AddFile($filename);
		}   
	}
	$rsp = $oMX->error->text; /* missing feature */
	echo $rsp;
?>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions