The question is that I want to convert some commands like below to xml:
cmd [ < ipv4 | ipv6 > [ unicast | multicast | vpn | labeled-unicast | flowspec ] ]
It seem like I need to write:
COMMAND cmd
PARAM mode="switch" optional="true"
PARAM ipv4 mode="subcommand"
PARAM mode="switch" optional="true"
PARAM unicast mode="subcommand"
PARAM multicast mode="subcommand"
PARAM vpn mode="subcommand"
PARAM labeled-unicast mode="subcommand"
PARAM flowspec mode="subcommand"
PARAM ipv6 mode="subcommand"
PARAM mode="switch" optional="true"
PARAM unicast mode="subcommand"
PARAM multicast mode="subcommand"
PARAM vpn mode="subcommand"
PARAM labeled-unicast mode="subcommand"
PARAM flowspec mode="subcommand"
But I would like to write:
COMMAND cmd
PARAM nop optional="true"
PARAM mode="switch"
PARAM ipv4 mode="subcommand"
PARAM ipv6 mode="subcommand"
PARAM mode="switch" optional="true"
PARAM unicast mode="subcommand"
PARAM multicast mode="subcommand"
PARAM vpn mode="subcommand"
PARAM labeled-unicast mode="subcommand"
PARAM flowspec mode="subcommand"
PARAM nop is used to control optional of its child params but user in CLI doesn't need to enter value for it.
I found that somebody had created an issue about this in google code. It's Issue 82.
So is that feature available?
Looking forward to your reply,
Thank you