Project

General

Profile

« Previous | Next » 

Revision 24

Added by Matt Jones about 24 years ago

completed basic DBReader functionality. Can now read XML from DB using DBReader

View differences:

BasicNode.java
41 41
    // used by JTree to display this node
42 42
    public String toString ()
43 43
    {
44
	StringBuffer	value = new StringBuffer ();
45
	value.append ('<');
46
	value.append (getTagName ());
47
	value.append (getAttributes ().toString ());
48
	value.append ('>');
49
	return value.toString ();
44
	StringBuffer value = new StringBuffer();
45
	value.append('<');
46
	value.append(getTagName());
47
	value.append(getAttributes().toString());
48
	value.append('>');
49
        // Process children recursively here?
50
        // Or do it in ReaderElement using a stack so we don;t have the 
51
        // whole thing in memory at once?
52
	//value.append("</");
53
	//value.append(getTagName());
54
	//value.append('>');
55
	return value.toString();
50 56
    }
51 57

  
52 58
    /** Get the id of this element */
......
95 101
      while (attList.hasMoreElements()) {
96 102
        attName = (String)attList.nextElement();
97 103
        attValue = (String)attributes.get(attName);
98
        buf.append(" ").append(attName).append("=").append(attValue);        
104
        buf.append(" ").append(attName).append("=\"").append(attValue).append("\"");        
99 105
      }
100 106
      return buf.toString();      
101 107
    }

Also available in: Unified diff