Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

How to write XML into MD-SAL?

Prior to Lithium SR2 there used to be a utility method which allowed restoring DataObject from XML, namely RestconfUtils.dataObjectFromInputStream. This method was extremely useful for populating data for unit tests. This method has been removed in Li SR2. I wonder what is equivalent method in Li SR2? Someone recommended to create a codec pipeline: parse the XML into DOM, then translate to NormalizedNodes via DomToNormalizedNodeParserFactory, then transform it to DataObjects via binding-data-codec (BindingNormalizedNodeCodecRegistry and friends). Tried two days and still can't make work. Can someone provide a sample code?

Thanks in advance.