Comments in ak.xstartup

9 views
Skip to first unread message

CBF

unread,
May 14, 2007, 10:47:00 AM5/14/07
to Comet Way Agent Kernel
I am playing around with various configurations and I would like to
add comments in my startup-files. Bad for me, the XMLParser throws an
exception:
!070514-163702 001_XMLStartupAgent! Error Parsing XML
com.cometway.xml.XMLParserException: Unexpected token: <!--
ak.xstartup-file for IMSArtikelDownload -->
at com.cometway.xml.XMLParser.nextToken(XMLParser.java:254)
at
com.cometway.xml.XMLPropsList.parseInputStream(XMLPropsList.java:228)
at
com.cometway.xml.XMLPropsList.loadFromFile(XMLPropsList.java:317)
at com.cometway.xml.XMLStartupAgent.start(XMLStartupAgent.java:
47)
at com.cometway.ak.AgentCommand.execute(AgentCommand.java:61)
at
com.cometway.ak.AgentController.executeState(AgentController.java:216)
at
com.cometway.ak.AgentController.waitForState(AgentController.java:165)
at com.cometway.ak.AgentController.start(AgentController.java:
84)
at com.cometway.ak.AK.startStartupAgent(AK.java:234)
at com.cometway.ak.AK.main(AK.java:265)

as you see, I wanted to add a comment in proper XML-Style <!-- -->.
Has anyone some ideas or suggestions before I start to modify
XMLParser or XMLToken class?

Greetings from Austria!

Clemens

Paul

unread,
May 14, 2007, 12:40:19 PM5/14/07
to Comet Way Agent Kernel
Clemens, Thanks for your post to the list!

Hmmm... never considered putting comments in the XML files!

I suppose that's something the XMLParser should probably recognize and
ignore implicitly, but our simple XML requirements have never put that
to the test!

We'll definitely work that into the next update. There have been many
minor fixes and improvements to the AK that we've made since the 2.6
release that we should get posted later this week.

In the meantime, you can modify com.cometway.xml.XMLStartupAgent to
ignore tags that start with "<!--" and that would get your XML loading
properly.

-- Paul Cunningham, Comet Way

Reply all
Reply to author
Forward
0 new messages