Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New tool for validate XML

 
Isaac Ferguson
Ranch Hand
Posts: 922
2
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,
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
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.
 
chris webster
Bartender
Posts: 2407
33
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: 922
2
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic