public void toXML(XMLStreamWriter writer,String orientation) throws XMLStreamException {
  writer.writeStartElement("location");
  writer.writeAttribute("compilationunit",unit);
  writer.writeAttribute("orientation",orientation);
  writer.writeAttribute("linenumber",line + "");
  writer.writeAttribute("columnnumber",column + "");
  writer.writeAttribute("offset",offset + "");
  writer.writeEndElement();
}

public void toXML ( XMLStreamWriter writer , String orientation ) throws XMLStreamException { writer . writeStartElement ( "location" ) ; writer . writeAttribute ( "compilationunit" , unit ) ; writer . writeAttribute ( "orientation" , orientation ) ; writer . writeAttribute ( "linenumber" , line + "" ) ; writer . writeAttribute ( "columnnumber" , column + "" ) ; writer . writeAttribute ( "offset" , offset + "" ) ; writer . writeEndElement ( ) ; }
writes the location information directly into an xml document
