function dataimport_fetch_config()
        {
          $.ajax
          (
            {
              url : handler_url + '?command=show-config&indent=true',
              dataType : 'xml',
              context : $( '#dataimport_config', config_element ),
              beforeSend : function( xhr, settings )
              {
                error_element
                  .empty()
                  .hide();
              },
              success : function( config, text_status, xhr )
              {
                dataimport_element
                  .removeClass( 'error' );

                config_element
                  .addClass( 'hidden' );

                var entities = [ '<option value=""></option>' ];

                $( 'document > entity', config )
                  .each
                  (
                    function( i, element )
                    {
                      entities.push( '<option>' + $( element ).attr( 'name' ).esc() + '</option>' );
                    }
                  );
                                
                $( '#entity', form_element )
                  .html( entities.join( "\n" ) );

                $( '.editable textarea', this )
                  .val( xhr.responseText.replace( /\n+$/, '' ) );
              },
              error : function( xhr, text_status, error_thrown )
              {
                if( 'parsererror' === error_thrown )
                {
                  dataimport_element
                    .addClass( 'error' );
                                    
                  error_element
                    .text( 'Dataimport XML-Configuration is not valid' )
                    .show();

                  config_element
                    .removeClass( 'hidden' );
                }
              },
              complete : function( xhr, text_status )
              {
                var code = $(
                  '<pre class="syntax language-xml"><code>' +
                  xhr.responseText.esc() +
                  '</code></pre>'
                );
                $( '.formatted', this ).html( code );

                if( 'success' === text_status )
                {
                  hljs.highlightBlock( code.get(0) );
                }
              }
            }
          );
        }
function dataimport_fetch_config()
        {
          $.ajax
          (
            {
              url : handler_url + '?command=show-config&indent=true',
              dataType : 'xml',
              context : $( '#dataimport_config', config_element ),
              beforeSend : function( xhr, settings )
              {
                error_element
                  .empty()
                  .hide();
              },
              success : function( config, text_status, xhr )
              {
                dataimport_element
                  .removeClass( 'error' );

                config_element
                  .addClass( 'hidden' );

                var entities = [ '<option value=""></option>' ];

                $( 'document > entity', config )
                  .each
                  (
                    function( i, element )
                    {
                      entities.push( '<option>' + $( element ).attr( 'name' ).esc() + '</option>' );
                    }
                  );
                                
                $( '#entity', form_element )
                  .html( entities.join( "\n" ) );

                $( '.editable textarea', this )
                  .val( xhr.responseText.replace( /\n+$/, '' ) );
              },
              error : function( xhr, text_status, error_thrown )
              {
                if( 'parsererror' === error_thrown )
                {
                  dataimport_element
                    .addClass( 'error' );
                                    
                  error_element
                    .text( 'Dataimport XML-Configuration is not valid' )
                    .show();

                  config_element
                    .removeClass( 'hidden' );
                }
              },
              complete : function( xhr, text_status )
              {
                var code = $(
                  '<pre class="syntax language-xml"><code>' +
                  xhr.responseText.esc() +
                  '</code></pre>'
                );
                $( '.formatted', this ).html( code );

                if( 'success' === text_status )
                {
                  hljs.highlightBlock( code.get(0) );
                }
              }
            }
          );
        }
function dataimport_fetch_config ( ) { $ . ajax ( { url : handler_url + '?command=show-config&indent=true' , dataType : 'xml' , context : $ ( '#dataimport_config' , config_element ) , beforeSend : function ( xhr , settings ) { error_element . empty ( ) . hide ( ) ; } , success : function ( config , text_status , xhr ) { dataimport_element . removeClass ( 'error' ) ; config_element . addClass ( 'hidden' ) ; var entities = [ '<option value=""></option>' ] ; $ ( 'document > entity' , config ) . each ( function ( i , element ) { entities . push ( '<option>' + $ ( element ) . attr ( 'name' ) . esc ( ) + '</option>' ) ; } ) ; $ ( '#entity' , form_element ) . html ( entities . join ( "\n" ) ) ; $ ( '.editable textarea' , this ) . val ( xhr . responseText . replace ( / \n+$ / , '' ) ) ; } , error : function ( xhr , text_status , error_thrown ) { if ( 'parsererror' === error_thrown ) { dataimport_element . addClass ( 'error' ) ; error_element . text ( 'Dataimport XML-Configuration is not valid' ) . show ( ) ; config_element . removeClass ( 'hidden' ) ; } } , complete : function ( xhr , text_status ) { var code = $ ( '<pre class="syntax language-xml"><code>' + xhr . responseText . esc ( ) + '</code></pre>' ) ; $ ( '.formatted' , this ) . html ( code ) ; if ( 'success' === text_status ) { hljs . highlightBlock ( code . get ( 0 ) ) ; } } } ) ; }
config
config