}
private void constructElement(Node element, String[] expected) {
int i;
int nSpaces;
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);
spaceElement.setTextCAttribute(nSpaces);
element.appendChild(spaceElement);
}
} else {
element.appendChild(dom.createTextNode(expected[i]));
}