private void insertAfter ( final URI hrefValue , final StringBuffer parentResult , final CharSequence tmpContent ) { int insertpoint = parentResult . lastIndexOf ( "</" ) ; final int end = parentResult . indexOf ( ">" , insertpoint ) ; if ( insertpoint == - 1 || end == - 1 ) { logger . error ( MessageUtils . getMessage ( "DOTJ033E" , hrefValue . toString ( ) ) . toString ( ) ) ; } else { if ( ELEMENT_NAME_DITA . equals ( parentResult . substring ( insertpoint , end ) . trim ( ) ) ) { insertpoint = parentResult . lastIndexOf ( "</" , insertpoint - 1 ) ; } parentResult . insert ( insertpoint , tmpContent ) ; } }
Append XML content into root element