/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.controller.netconf.util.xml;
+package org.opendaylight.controller.config.util.xml;
import com.google.common.base.Charsets;
import com.google.common.base.Optional;
import javax.xml.validation.SchemaFactory;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathExpressionException;
-import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
public static Element createTextElementWithNamespacedContent(final Document document, final String qName, final String prefix,
final String namespace, final String contentWithoutPrefix, final Optional<String> namespaceURI) {
- String content = createPrefixedValue(XmlNetconfConstants.PREFIX, contentWithoutPrefix);
+ String content = createPrefixedValue(XmlMappingConstants.PREFIX, contentWithoutPrefix);
Element element = createTextElement(document, qName, content, namespaceURI);
String prefixedNamespaceAttr = createPrefixedValue(XMLNS_ATTRIBUTE_KEY, prefix);
element.setAttributeNS(XMLNS_URI, prefixedNamespaceAttr, namespace);
transformer.transform(source, result);
return result.getWriter().toString();
- } catch (Exception | TransformerFactoryConfigurationError e) {
+ } catch (Exception | TransformerFactoryConfigurationError e) {
throw new IllegalStateException("Unable to serialize xml element " + xml, e);
}
}