Converting NETCONF XML to SQL Server tables

June 27, 2018

In this guide we will show you how to process NETCONF XML files with the enterprise version of Flexter and convert it to SQL Server.

NETCONF XML

The Network Configuration Protocol (NETCONF) is a network management protocol developed and standardized by the IETF.
NETCONF provides mechanisms to install, manipulate, and delete the configuration of network devices. Its operations are realized on top of a simple Remote Procedure Call (RPC) layer. The NETCONF protocol uses an Extensible Markup Language (XML) based data encoding for the configuration data as well as the protocol messages. The protocol messages are exchanged on top of a secure transport protocol.

SQL Server

Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network (including the Internet).

Setting up SQL Server

  • First we connect to the server through SQL Server Management Studio (SSMS)

  • Then we create a new Database

  • We name our new DB ‘flexter’

  • Then we go to Security under Databases and create a New Login…

  • We select SQL Server authentication and put our Login name and Password. Under ‘Default Database’ we select ‘flexter’

  • Then under ‘User Mapping’ we mark ‘flexter’ and ‘db_owner’ and click OK

  • And now we can start processing the file

[flexter_button]

Processing NETCONF XML file

We will use the Docker version of Enterprise Flexter on Localhost.

  • We run docker with the below command and create a container that will be destroyed when we exit

  • Next we generate the Logical Schema ID

We get a result similliar to this:

  • We now extract our data to SQL Server

We get a result similliar to this:

  • And now we can see our data

Input file

You can download the file we used here.

Conclusion

In this post, we have shown you how to convert complex XML and upload them to MS SQL Server.

If you are interested in a downloadable trial version of Flexter please reach out.
[faq_button]