Esempio n. 1
0
 protected String formatXmlRecordHeader(
     String className, String recordId, String version, String instance) {
   StringBuilder builder = new StringBuilder();
   builder
       .append("<")
       .append(className)
       .append(" recordId=\"0x")
       .append(recordId)
       .append("\" version=\"0x")
       .append(version)
       .append("\" instance=\"0x")
       .append(instance)
       .append("\" size=\"")
       .append(getRecordSize())
       .append("\">\n");
   return builder.toString();
 }
Esempio n. 2
0
 /**
  * @param tab - each children must be a right of his parent
  * @return xml representation of this record
  */
 public String toXml(String tab) {
   StringBuilder builder = new StringBuilder();
   builder
       .append(tab)
       .append("<")
       .append(getClass().getSimpleName())
       .append(">\n")
       .append(tab)
       .append("\t")
       .append("<RecordId>0x")
       .append(HexDump.toHex(_recordId))
       .append("</RecordId>\n")
       .append(tab)
       .append("\t")
       .append("<Options>")
       .append(_options)
       .append("</Options>\n")
       .append(tab)
       .append("</")
       .append(getClass().getSimpleName())
       .append(">\n");
   return builder.toString();
 }