public static Element createElement ( String localPart , String prefix , String uri ) { Document doc = getOwnerDocument ( ) ; if ( prefix == null || prefix . length ( ) == 0 ) { if ( ROOT_LOGGER . isTraceEnabled ( ) ) ROOT_LOGGER . trace ( "createElement {" + uri + "}" + localPart ) ; return doc . createElementNS ( uri , localPart ) ; } else { if ( ROOT_LOGGER . isTraceEnabled ( ) ) ROOT_LOGGER . trace ( "createElement {" + uri + "}" + prefix + ":" + localPart ) ; return doc . createElementNS ( uri , prefix + ":" + localPart ) ; } }
Create an Element for a given name prefix and uri . This uses the document builder associated with the current thread .