• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

New tool for validate XML

 
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Angus Ferguson
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic