Patent ID: 7409673

Claim:
Method for enabling a user to edit an XML document using an XML document editor to add or delete an element into a working document and to convert said working document into an XML document file; comprising the step of enabling said XML document editor to automatically generate, in relation to two consecutive elements z i and z i+1 of said working document, a list of candidate third elements z to be provided to a user; wherein said third elements z in said list are selected such that relations between elements z i and z and between elements z and z i+1 comply with said Document Type Definition (DTD) of said working document after said element z is inserted between elements z i and z i+1 , said list enabling the user to select any of the candidate third elements z and add them to the working document without affecting DTD compliance of the working document, wherein whether the relation between two consecutive elements complies with said DTD is determined according to the following rule: suppose G is Glushkov Automaton of said document, z i is a state in G, 1≦i≦p−1, pεN, Σ={z 1 , z 2 , . . . z p } is a sequence of states in G where z 1 =s, s is start state of G, z p =f, f is final state of G; if z i+1 εreachable(z i ), wherein reachable(z i ) denote the set of states in G reachable from state z i , then the relation between z i and z i+1 is determined compliant with DTD of said document.