1

In my project, I have a reference to XMLReader in a plugin; however, I get this error message:

Class 'Craft\XMLReader' not found

Here is the code which calls it:

$reader = new XMLReader();

Can XMLReader be used within Craft, or can there be a customization which would allow it? Thanks

1

You need to be in the correct namespace try

$reader = new \XMLReader();

Like here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.