protected Document createSingleElementDocument ( String namespaceUri , String namespacePrefix , String name , Cardinality cardinality ) { Document doc = mDocumentBuilder . newDocument ( ) ; String qualifiedName = namespacePrefix + ":" + name ; Element e = doc . createElementNS ( namespaceUri , qualifiedName ) ; e . setAttributeNS ( null , "ifmap-cardinality" , cardinality . toString ( ) ) ; doc . appendChild ( e ) ; return doc ; }
Creates a metadata document with a single element and given namespace information .