■ dump 함수 : XML 문자열 출력하기
▶ 예제 코드 (PY)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from xml.etree.ElementTree import Element, dump noteElement = Element('note') toElement = Element('to') toElement.text = 'Tove' noteElement.append(toElement) dump(noteElement) """ <note><to>Tove</to></note> """ |