This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

New tool for validate XML  RSS feed

 
Ranch Hand
Posts: 1108
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am interested in develop a validator for automatize several task.

The first step is read an XML and find the URL tag. Then get that URL(which is a call to a webService) and call notepad ++(or other tool)
in order to validate the webService XML agains a .xsd.

After that if there is any error in the validations I would like write it in a report and generate a PDF else there are another steps which I will let you know later

I have been adviced using groovy because it works properly with XML I have no knowledge about it but if it is needed I would learn it. But maybe is easy do it in java.

I would like open a discussion about this.

What do you think is the best approach?

Is there any open source tool which is already making this?

Any advice, please?

Thanks

Regards,
 
author & internet detective
Marshal
Posts: 38508
653
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it can be done in Java. The idea of proposing Groovy was so that you could learn something new. And it is less code in Groovy.

Here is how to parse XML is groovy. For the PDF part, you can use iText.

Also, remember Groovy can call Java code. Which means you can do anything in Groovy that you can do in Java.
 
Bartender
Posts: 2407
36
Linux Oracle Postgres Database Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Groovy makes a lot of XML processing *much* easier than Java. Go ahead and try it out. And as Jeanne says, you can always drop back to Java if necessary.
 
Isaac Ferguson
Ranch Hand
Posts: 1108
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am developing a validation tool which validates xml again xsd. But at some point the xml contains fiedls which are optional like maxOccurs="0"/>

In that cases I donĀ“t know if the field has been populated in the XML. Because it is not mandatory.

I need to provide more information about it. In the meantime can you give any advice, please?

Thanks
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!