TextSElement spaceElement;
for (i = 0; i < expected.length; i++) {
if (expected[i].startsWith("*")) {
if (expected[i].equals("*t")) {
element.appendChild(new TextTabElement(dom));
} else if (expected[i].equals("*n")) {
element.appendChild(new TextLineBreakElement(dom));
} else {
nSpaces = Integer.parseInt(expected[i].substring(2));
spaceElement = new TextSElement(dom);