POLITECHNIKA RZESZOWSKA - Wydział Elektrotechniki I Informatyki
public static void main(String(] args) throws Exception {
Document document - DocumentBuilderFactory.newInstance()
.newDocumentBuilder () .parse(new File ("danNodeSairple.xmI”)); Node node = document. getDocumentF.l e.ment () ;
Node childNode = node.getFirstChildO ; int i - 1;
while(childNode !“ nuli) (
String typeStr ■>
switch(childNode.getNodeType())(
case Node. ATTRIBUTE_NODE:
typeStr +- "ATTRIBOTEJNOEE"; break;
JAVA Wykładu
Copyright <£> 2012 Jan PROKOP