question: public void testAddingADocumentFragmentAddsItsChildren ( ) { Element a = document . createElement ( "a" ) ; Element b = document . createElement ( "b" ) ; Element c = document . createElement ( "c" ) ; DocumentFragment fragment = document . createDocumentFragment ( ) ; fragment . appendChild ( a ) ; fragment . appendChild ( b ) ; fragment . appendChild ( c ) ; Node returned = menu . appendChild ( fragment ) ; assertSame ( fragment , returned ) ; NodeList children = menu . getChildNodes ( ) ; assertEquals ( 6 , children . getLength ( ) ) ; assertTrue ( children . item ( 0 ) instanceof Text ) ; assertEquals ( item , children . item ( 1 ) ) ; assertTrue ( children . item ( 2 ) instanceof Text ) ; assertEquals ( a , children . item ( 3 ) ) ; assertEquals ( b , children . item ( 4 ) ) ; assertEquals ( c , children . item ( 5 ) ) ; }
target:  Documents shouldn't contain document fragments. http://code.google.com/p/android/issues/detail?id=2735