1 package org.objectweb.celtix.tools.extensions.xmlformat; 2 3 import javax.wsdl.Definition; 4 5 import org.w3c.dom.*; 6 7 import org.objectweb.celtix.helpers.XMLUtils; 8 import org.objectweb.celtix.tools.common.ToolConstants; 9 10 public class XMLFormatParser { 11 12 private XMLUtils xmlUtils = new XMLUtils(); 13 14 public void parseElement(Definition def, XMLFormat xmlFormat, Element element) { 15 Attr rootNodeAttribute = xmlUtils.getAttribute(element, ToolConstants.XMLBINDING_ROOTNODE); 16 String rootNodeValue = rootNodeAttribute.getValue(); 17 18 if (rootNodeValue != null) { 19 xmlFormat.setRootNode(xmlUtils.getNamespace(def.getNamespaces(), 20 rootNodeValue, 21 def.getTargetNamespace())); 22 } 23 } 24 } 25 | Popular Tags |