Is there any tool to validate @XmlPath annotations? [closed]

心不动则不痛 提交于 2019-12-12 16:38:59

问题


Is there any tool to validate @XmlPath annotations used from MOXy JAXB at a specific xml file at compile time from Eclipse or IntelliJIdea java framework or something else?


回答1:


There is no corresponding IDE tooling yet. You could use the EclipseLink MOXy JAXBContext to generate an XML schema and then use it to validate the XML document.

For more information of XPath based mapping an @XmlPath see:

  • http://bdoughan.blogspot.com/2010/07/xpath-based-mapping.html
  • http://bdoughan.blogspot.com/2010/09/xpath-based-mapping-geocode-example.html
  • http://bdoughan.blogspot.com/2011/03/map-to-element-based-on-attribute-value.html

UPDATE

The Dali team is adding this support in the upcoming Juno release of Eclipse. You can try this out today:

  • http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/junom6



回答2:


Dali added this to Eclipse in the Juno release. You get content assist and validation on @XmlPath annotations among others. http://www.eclipse.org/webtools/releases/3.4.0/NewAndNoteworthy/jpt.php



来源:https://stackoverflow.com/questions/3422409/is-there-any-tool-to-validate-xmlpath-annotations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!