// 2) find a way to do a pull parser of the xml stream;
// looking for patterns which indicate where to insert the new GLink
// TODO: now read in from the InputStream 'in' and look for the pattern and write to generatedGegFile
GLinkPattern pattern = new GLinkPattern("</g:glinks>");
pattern.setCompareSize(pattern.getToMatch().length());
pattern.setNumberOfMatches(1);
GegPullHandler handler = new GegPullHandler();
handler.setInsertDelta( - (pattern.getToMatch().length()) - 5);
handler.setToName(toName);
handler.setToURL(toURL);
handler.setToRelation(toRelValue);
handler.setFromRelation(fromRelValue);
handler.setOutWriter(out);