flow: Simple XML example not working on Windows 10 / PHP 8.2.10

Hello! I’m new to Flow-PHP, and trying to implement a the XML example and I get this error:

Fatal error: Uncaught Exception: Unknown scheme “C”

My code:

declare(strict_types=1);

use function Flow\ETL\Adapter\XML\from_xml;
use function Flow\ETL\DSL\{data_frame, ref, to_output};

require __DIR__ . 'path/to/autoload.php';
	
data_frame()
	->read(from_xml(
		__DIR__ . '/Data.xml',
		''
	))
	->write(to_output(false))
	->run();

I’d appreciate any help.

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

etl-adapter-xml requires flow-php/etl ^0.6.0 || 1.x-dev, so it wouldn’t let me use ^0.7.0.

🤦‍♂️ again I forgot to bump dependencies, sorry for that. I’m gonna look for a more permanent and automated solution for this problem.

Thank you so much for all your help!

You are more than welcome, good luck with your project!

Thanks, that’s actually super helpful, I think I know exactly what’s wrong here. Give me some time to play around with this, I might be able to fix it

hmm, I was able to read that file with no issues even that Unit should most likely be under another node like:

<Units>
   <Unit>...</Unit>
   <Unit>...</Unit>
</Units>

Could you please try to execute the same code on some unix machine? Is there any trace of this error? I have never seen something like that, and I don’t remember any Flow error that could give you a similar message.

Hey, could you please provide also sample of this xml file? I need to check if its windows or file related problem.