comparison artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java @ 270:89f6de49803d

Modified the method to create the document to trigger the out() operation of a collection in ClientProtocolUtils. artifacts/trunk@2046 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 03 Jun 2011 06:37:23 +0000
parents 72de5c373c9b
children f5a0f90bcc6f
comparison
equal deleted inserted replaced
269:d9a99b28a847 270:89f6de49803d
382 XMLUtils.ElementCreator cr = new XMLUtils.ElementCreator( 382 XMLUtils.ElementCreator cr = new XMLUtils.ElementCreator(
383 doc, 383 doc,
384 ArtifactNamespaceContext.NAMESPACE_URI, 384 ArtifactNamespaceContext.NAMESPACE_URI,
385 ArtifactNamespaceContext.NAMESPACE_PREFIX); 385 ArtifactNamespaceContext.NAMESPACE_PREFIX);
386 386
387 Element action = cr.create("action"); 387 Element action = cr.create("action");
388 Element attributes = cr.create("attributes");
389 388
390 cr.addAttr(action, "name", mode, true); 389 cr.addAttr(action, "name", mode, true);
391 cr.addAttr(action, "type", type, true); 390 cr.addAttr(action, "type", type, true);
392 391
393 doc.appendChild(action); 392 doc.appendChild(action);
394 393
395 if (attr != null) { 394 if (attr != null) {
396 Node root = attr.getFirstChild(); 395 Node root = attr.getFirstChild();
397 396
398 if (root != null) { 397 if (root != null) {
399 action.appendChild(attributes); 398 action.appendChild(doc.importNode(root, true));
400 attributes.appendChild(doc.importNode(root, true));
401 } 399 }
402 } 400 }
403 401
404 return doc; 402 return doc;
405 } 403 }

http://dive4elements.wald.intevation.org