MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / writeChildren

Method writeChildren

src/org/kxml2/kdom/Node.java:319–365  ·  view source on GitHub ↗

Writes the children of this node to the given XmlWriter.

(XmlSerializer writer)

Source from the content-addressed store, hash-verified

317 /** Writes the children of this node to the given XmlWriter. */
318
319 public void writeChildren(XmlSerializer writer) throws IOException {
320 if (children == null)
321 return;
322
323 int len = children.size();
324
325 for (int i = 0; i < len; i++) {
326 int type = getType(i);
327 Object child = children.elementAt(i);
328 switch (type) {
329 case ELEMENT :
330 ((Element) child).write(writer);
331 break;
332
333 case TEXT :
334 writer.text((String) child);
335 break;
336
337 case IGNORABLE_WHITESPACE :
338 writer.ignorableWhitespace((String) child);
339 break;
340
341 case CDSECT :
342 writer.cdsect((String) child);
343 break;
344
345 case COMMENT :
346 writer.comment((String) child);
347 break;
348
349 case ENTITY_REF :
350 writer.entityRef((String) child);
351 break;
352
353 case PROCESSING_INSTRUCTION :
354 writer.processingInstruction((String) child);
355 break;
356
357 case DOCDECL :
358 writer.docdecl((String) child);
359 break;
360
361 default :
362 throw new RuntimeException("Illegal type: " + type);
363 }
364 }
365 }
366}

Callers 3

writeMethod · 0.95
writeMethod · 0.80
writeMethod · 0.80

Calls 4

getTypeMethod · 0.95
textMethod · 0.80
sizeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected