aspose file tools*
The moose likes XML and Related Technologies and the fly likes New tool for validate XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "New tool for validate XML" Watch "New tool for validate XML" New topic
Author

New tool for validate XML

Isaac Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 418
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

Joined: May 26, 2003
Posts: 31054
    
162

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1871
    
  16

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.


No more Blub for me, thank you, Vicar.
Isaac Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 418
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: New tool for validate XML