public static Element addElementFirst ( final Element parent , final String name ) { final Element ele = parent . getOwnerDocument ( ) . createElement ( name ) ; parent . insertBefore ( ele , null ) ; return ele ; }
Create a new element and add it as the first child