A method for creating at least one rule of a rule set for using the rule set in a method for conversion of an input document data stream with one or more documents into a structured data file for generation of an output document data stream, wherein for the conversion of the input document data stream - from the input document data stream data are extracted according to the rule set and are stored in the structured data file, - in the structured data file field names are assigned to the individual data fields and the data fields are structured in a plurality of data levels, and - the rule set is designed such that arbitrary data from the input document data stream can be mapped to an arbitrary data field of the structured data file, and wherein for creating the rule - via a graphical user interface with several windows in a first window at least one template document is shown that corresponds to the format of the documents contained in the input document data stream, and in a second window the data fields are arranged in a tree structure comprising several levels, - with graphic means a source data (23, 33) of the template document is marked or several in particular logically associated source data of the template document are marked as associated marking range (24, 24/1, 24/2, 24/3, 24/4, 24/5, 24/6, 38, 44) and at least one structure element (21, 22, 22/I, 22/II) of the tree structure corresponding to the marking range (23, 24) is assigned to the marking range (23, 24, 38, 44), the template document being displayed in rows and columns and the marking range (24, 38, 44) being freely selectable in rows and columns, - in the template document a repeat element that is characteristic for a structure recurring in the template document, a so-called repeat structure, is selected, - row and/or column positions within the marking range in the template document are detected as structurally characteristic data of the repeat element and/or a text content within the marking range in the template document is detected as characteristic data of the repeat element, manually or automatically, - in the template document several marking ranges (38, 39) are marked which are nested within one another in a manner that spans across levels and which are displayed simultaneously, and - computer-assisted automatically or manually via a menu navigation for a user the tree structure is displayed and structure elements of the tree structure are inserted, modified and/or deleted, wherein corresponding modifications to stored structure elements are made automatically. - from the input document data stream data are extracted according to the rule set and are stored in the structured data file, - in the structured data file field names are assigned to the individual data fields and the data fields are structured in a plurality of data levels, and - the rule set is designed such that arbitrary data from the input document data stream can be mapped to an arbitrary data field of the structured data file, and wherein for creating the rule - via a graphical user interface with several windows in a first window at least one template document is shown that corresponds to the format of the documents contained in the input document data stream, and in a second window the data fields are arranged in a tree structure comprising several levels, - with graphic means a source data (23, 33) of the template document is marked or several in particular logically associated source data of the template document are marked as associated marking range (24, 24/1, 24/2, 24/3, 24/4, 24/5, 24/6, 38, 44) and at least one structure element (21, 22, 22/I, 22/II) of the tree structure corresponding to the marking range (23, 24) is assigned to the marking range (23, 24, 38, 44), the template document being displayed in rows and columns and the marking range (24, 38, 44) being freely selectable in rows and columns, - in the template document a repeat element that is characteristic for a structure recurring in the template document, a so-called repeat structure, is selected, - row and/or column positions within the marking range in the template document are detected as structurally characteristic data of the repeat element and/or a text content within the marking range in the template document is detected as characteristic data of the repeat element, manually or automatically, - in the template document several marking ranges (38, 39) are marked which are nested within one another in a manner that spans across levels and which are displayed simultaneously, and - computer-assisted automatically or manually via a menu navigation for a user the tree structure is displayed and structure elements of the tree structure are inserted, modified and/or deleted, wherein corresponding modifications to stored structure elements are made automatically.