01: package org.objectweb.celtix.tools.extensions.xmlformat;
02:
03: import javax.wsdl.Definition;
04:
05: import org.w3c.dom.*;
06:
07: import org.objectweb.celtix.helpers.XMLUtils;
08: import org.objectweb.celtix.tools.common.ToolConstants;
09:
10: public class XMLFormatParser {
11:
12: private XMLUtils xmlUtils = new XMLUtils();
13:
14: public void parseElement(Definition def, XMLFormat xmlFormat,
15: Element element) {
16: Attr rootNodeAttribute = xmlUtils.getAttribute(element,
17: ToolConstants.XMLBINDING_ROOTNODE);
18: String rootNodeValue = rootNodeAttribute.getValue();
19:
20: if (rootNodeValue != null) {
21: xmlFormat.setRootNode(xmlUtils.getNamespace(def
22: .getNamespaces(), rootNodeValue, def
23: .getTargetNamespace()));
24: }
25: }
26: }
|