| Revision 203,
827 bytes
checked in by jdalbey, 6 years ago
(diff) |
|
XMLWriter.java name changed to XMLBuilder. Add pretty printing methods (ticket #237).
|
| Line | |
|---|
| 1 | package scriptbuilder.structures; |
|---|
| 2 | |
|---|
| 3 | /** |
|---|
| 4 | * |
|---|
| 5 | * @author Bryan McGuffin |
|---|
| 6 | */ |
|---|
| 7 | class Location_Info implements I_XML_Writable |
|---|
| 8 | { |
|---|
| 9 | |
|---|
| 10 | public String Location_ID = ""; |
|---|
| 11 | |
|---|
| 12 | public String Route = ""; |
|---|
| 13 | |
|---|
| 14 | public String Direction = ""; |
|---|
| 15 | |
|---|
| 16 | public String Postmile = ""; |
|---|
| 17 | |
|---|
| 18 | public String Location_type = ""; |
|---|
| 19 | |
|---|
| 20 | @Override |
|---|
| 21 | public String toXML() |
|---|
| 22 | { |
|---|
| 23 | String output = XMLBuilder.openTag(ELEMENT.LOCATION_INFO.tag + " ID=\"" + Location_ID + "\""); |
|---|
| 24 | |
|---|
| 25 | output += XMLBuilder.simpleTag(Route, ELEMENT.Route); |
|---|
| 26 | |
|---|
| 27 | output += XMLBuilder.simpleTag(Direction, ELEMENT.Direction); |
|---|
| 28 | |
|---|
| 29 | output += XMLBuilder.simpleTag(Postmile, ELEMENT.Postmile); |
|---|
| 30 | |
|---|
| 31 | output += XMLBuilder.simpleTag(Location_type, ELEMENT.Location_type); |
|---|
| 32 | |
|---|
| 33 | output += XMLBuilder.closeTag(ELEMENT.LOCATION_INFO.tag); |
|---|
| 34 | |
|---|
| 35 | return output; |
|---|
| 36 | } |
|---|
| 37 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.