Hi,
I followed the format defined in ClassMapping.java comments. The mapping should defined as follows:
* <class name="com.xxx.Abc" xmlPath="
<http:://com.xxx.ns#system><http://com.xxx.ns#config>"
* xmlContainer=""
* xmlNamespace="<
http://com.xxx.ns>" xmlTag="abc"
* keys="attr1,attr2"
* parentClass="com.xxx.AAA" />
* <attribute name="attr1" ... />
* <attribute name="attr2" ... />
* <attribute name="description" ... />
* </class>
In Path.java and PathSegment.java, you also tried to parse the string following the pattern defined above, that is <> for path, and # for namespace
However, eith "<" nor "#" is a valid character in XML definiation.
Even after I replaced the charcters with some XML characters, this still does not work.
Here is how I use this:<?xml version="1.0" encoding="UTF-8"?>
<netconfDataModel>
<class name="com.ibm.pcl.netconf.model.NCSystem" xmlPath="<urn:brocade.com:mgmt:brocade-ra#system>" xmlContainer="" xmlTag="urn:brocade.com:mgmt:brocade-rasXXXsystem" xmlNamespace="urn:brocade.com:mgmt:brocade-ras" keys=""/>
<class name="com.ibm.pcl.netconf.model.SwitchAttributes" xmlPath="<urn:brocade.com:mgmt:brocade-ra#system><urn:brocade.com:mgmt:brocade-ra#switch-attributes>" xmlContainer="" xmlTag="switch-attributes" xmlNamespace="urn:brocade.com:mgmt:brocade-ras" keys="" parentClass="com.ibm.pcl.netconf.model.NCSystem">
<attribute name="hostName" xmlContainer="" xmlTag="host-name" xmlNamespace="urn:brocade.com:mgmt:brocade-ras" readOnly="true" mandatory="false" many="false" />
<attribute name="chassisName" xmlContainer="" xmlTag="chassis-name" xmlNamespace="urn:brocade.com:mgmt:brocade-ras" readOnly="true" mandatory="false" many="false" />
</class>
</netconfDataModel>
Here is the error I got:org.jdom.IllegalNameException: The name "<urn:brocade.com:mgmt:brocade-ra#system><urn:brocade.com:mgmt:brocade-ra#switch-attributes>" is not legal for JDOM/XML elements: XML names cannot begin with the character "<".
at org.jdom.Element.setName(Element.java:207)