1 package com
.interrupt
.bob
.base
;
5 import org
.xml
.sax
.Attributes
;
8 * Assemble the XML string
10 public class ToXMLVisitorPass2
implements ISaxVisitor
{
12 private String parentns
= null;
13 private StringBuilder xmlString
= null;
14 private int formatDepth
= 0;
16 public ToXMLVisitorPass2() {
18 xmlString
= new StringBuilder();
21 public String
getXML() {
22 if(xmlString
== null) {
25 return xmlString
.toString();
28 public void visitStart(IBob bob
) {
31 //for(int i = 0; i < formatDepth; i++) {
32 // xmlString.append("\t");
36 String ostring
= bob
._getOpenString();
37 if( (ostring
!= null) && (ostring
.trim().length() > 0) ) {
38 xmlString
.append(ostring
);
41 //xmlString.append("\n");
44 public void visitEnd(IBob bob
) {
47 //for(int i = 0; i < formatDepth; i++) {
48 // xmlString.append("\t");
52 String cstring
= bob
._getCloseString();
53 if( (cstring
!= null) && (cstring
.trim().length() > 0) ) {
54 xmlString
.append(cstring
);
57 //xmlString.append("\n");