JFACTORY-GETXML-001

JFactory::getXML()

Factory::getXml() / JXMLElement

JXMLElement and Factory::getXml were removed. PHP's SimpleXML is the replacement.

JFactory::getXML()SimpleXMLElement

Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Patch possible — review itJoomla API

What you will see

  • Class "JXMLElement" not found
  • Call to undefined method Factory::getXml

Symptoms people search

manifest parse fatal

Replace this code

Swap JFactory::getXML() for SimpleXMLElement.

Joomla 3

Remove or stop calling this

$xml = JFactory::getXML($path, true);

Joomla 4 / 6

Use this instead

$xml = simplexml_load_file($path);
// or new \SimpleXMLElement($string)

How to fix it

  1. 1Use simplexml_load_file or SimpleXMLElement.
  2. 2Add error handling — SimpleXML returns false on bad XML.

Also known as

JXMLElement · getXML · getXml

Related issues

Get in touch

Have a project in mind? Let's talk about it.

Tell us what you're building. Whether it's a new site, an online store, a mobile app, or something that needs AI under the hood, we'll get back to you within a business day.

Free consultation
No commitment, no pressure
Reply within 24 hours
Usually much faster

Prefer a direct conversation?

Request a project quote

Tell us about your project

Fill out the quick form and we'll reach out.