Hello Reece, You need to define the prefixes using the Namespace APIs. Usually, they do not need to be "el:". It's up to the user to choose these prefixes. The key part is to map the prefix to a namespace, there should be a xmlns:el attribute on an appropriate parent node.
Typical code looks (here: SVG, adding an xlink: namespace) like this:
using a namespaced attribute: elem.setAttributeNS(SVGConstants.XLINK_NAMESPACE_URI, SVGConstants.XLINK_HREF_QNAME, value);
creating a namespaced element: document.createElementNS(namespaceURI, qualifiedName);
qualifiedName here is prefix+":"+tag name namespaceURI is the actual URI of the namespace. I guess the XML DOM factory will check the the namespace has been defined as above.