tail-f-systems / JNC

JNC (Java NETCONF Client) is the name of a Java library for communicating with NETCONF agents, and a plugin for pyang (http://code.google.com/p/pyang/) to generate Java classes from YANG models, to be used by the JNC library.
Other
77 stars 87 forks source link

Some files are not generated correctly by pyang using jnc.py #85

Closed kaushik2306 closed 1 year ago

kaushik2306 commented 6 years ago

The schema file generated is not well-formatted. For-example the JIF.schema file for interface yang is seen in single line. Getting below exception when reading the JIF.schema file Fatal Error] JIf.schema:1:2: The markup in the document preceding the root element must be well-formed. org.xml.sax.SAXParseException; systemId: file:///C:/Users/kchaudh/Documents/NetConf/JNC-master/jnc/src/gen2/ietfInterfaces/JIf.schema; lineNumber: 1; columnNumber: 2; The markup in the document preceding the root element must be well-formed. at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1239) at com.tailf.jnc.SchemaParser.readFile(SchemaParser.java:190) at com.tailf.jnc.SchemaParser.readFile(SchemaParser.java:163) at gen2.ietfInterfaces.JIf.registerSchema(JIf.java:50) at gen2.ietfInterfaces.JIf.enable(JIf.java:39) at mytest.NptNetconfClient.main(NptNetconfClient.java:66) Exception in thread "main" Parse error: parse file: org.xml.sax.InputSource@1c53fd30 error: org.xml.sax.SAXParseException; systemId: file:///C:/Users/kchaudh/Documents/NetConf/JNC-master/jnc/src/gen2/ietfInterfaces/JIf.schema; lineNumber: 1; columnNumber: 2; The markup in the document preceding the root element must be well-formed. at com.tailf.jnc.SchemaParser.readFile(SchemaParser.java:193) at com.tailf.jnc.SchemaParser.readFile(SchemaParser.java:163) at gen2.ietfInterfaces.JIf.registerSchema(JIf.java:50) at gen2.ietfInterfaces.JIf.enable(JIf.java:39) at mytest.NptNetconfClient.main(NptNetconfClient.java:66)

martin-volf commented 1 year ago

Fixed in recent changes.