nerdexam
CiscoCisco

350-401 · Question #513

350-401 Question #513: Real Exam Question with Answer & Explanation

The correct answer is B: Create an XML filter as a string and pass it to get_config() method as an argument.. Option B is correct because NETCONF natively uses XML for data encoding, and the get_config() method in the ncclient Python library accepts an optional filter parameter that takes an XML filter string - this instructs the NETCONF server to return only the requested subset of data

Submitted by khalil_dz· Mar 6, 2026Automation

Question

Refer to the exhibit. After running the code in the exhibit, which step reduces the amount of data that the NETCONF server returns to the NETCONF client, to only the interface's configuration?

Options

  • AUse the Ixml library to parse the data returned by the NETCONF server for the interface's configuration.
  • BCreate an XML filter as a string and pass it to get_config() method as an argument.
  • CCreate a JSON filter as a string and pass it to the get_config() method as an argument.
  • DUse the JSON library to parse the data returned by the NETCONF server for the interface's configuration.

Explanation

Option B is correct because NETCONF natively uses XML for data encoding, and the get_config() method in the ncclient Python library accepts an optional filter parameter that takes an XML filter string - this instructs the NETCONF server to return only the requested subset of data (e.g., a specific interface's configuration) before sending it to the client, reducing network overhead.

Option A is wrong because using lxml to parse data happens after the server has already returned the full dataset to the client - it filters locally, not at the server level, so it doesn't reduce the data transmitted.

Option C is wrong because NETCONF does not use JSON filters; NETCONF is an XML-based protocol, and passing a JSON string to get_config() would not be valid or recognized.

Option D is wrong for the same reason as A - using the JSON library is a client-side parsing operation that occurs after data is already received, and additionally, NETCONF doesn't use JSON natively.

Memory Tip: Think of it this way - filter at the source, not the destination. NETCONF = XML, and passing an XML filter to get_config() tells the server to do the heavy lifting, saving bandwidth before data ever leaves the device.

Topics

#NETCONF#API Filtering#XML#Configuration Management

Community Discussion

No community discussion yet for this question.

Full 350-401 PracticeBrowse All 350-401 Questions