xml


validate an XML based on an XSD and throw all errors at once in perl


I am trying to validate an XML based on a XSD. Below is the part of the code where i am validating the xml against xsd:
my $schema = XML::LibXML::Schema->new(location => $xsd);
my $parser = XML::LibXML->new;
my $doc = $parser->parse_file($xml);
eval { $schema->validate( $doc ) };
if ( my $ex = $# ) {
return $ex;
}
The code works fine but if the xml is not validated it gives me an error once i fix the issue in the xml and rerun the code i get different set of errors i just want to know if there is any way i can print all the validation errors at once?
I have even tried the solution given by #Paulo SantAnna in the below link:
Perl XML::LibXML::Schema will stop validation on first error
but even this didn't work.

Related Links

Nmap::Parser, Segmentation fault on large files
Atom or RSS, which one is better
Change or rearrange Magento Login and Log Out (top links) position using local.xml
XML attribute names and elements in default namespace?
Ignoring empty elements with XSL
xml with namespace unable to apply xsl
Loading an XML file with tinyxml
Need to parse out a piece of xml from a web.config
How to transform XML / JSON file into documents in Lotus Notes?
How to format the output file created with sqlplus?Why one of the output blocks appears two times?
Validate proxy URL using XML regex pattern
graphical diff tool with image output?
xpath getting value from children
Does the order of items in a csproj file matter?
Crawling the WP7 marketplace
trouble with recursive element in xsd schema

Categories

HOME
sonarqube
spark-streaming
gdb
apache-jena
obfuscation
composite-primary-key
jsf-2.2
javacc
xbee
mips
limit
maxscript
google-cloud-datalab
crystal-reports-2013
lanczos
okhttp
openpyxl
radgridview
selectize.js
libusb
android-7.0-nougat
asp.net-core-webapi
googlebot
parcelable
mongoid6
epsilon
flask-sqlalchemy
highstock
xunit
corpus
fragment-backstack
entity-relationship-model
linked-data
8051
handler
tpm
exchangewebservices
vex
custom-controls
event-flow
jbutton
angularjs-material
sendbird
least-squares
xdocreport
google-data-api
kill
laravel-elixir
jide
vaadin-elements
nanoc
dt
quicktime
cvxpy
slackware
google-cloud-console
spring-cloud-feign
nikeplus-api
wso2developerstudio
dimension
jclouds
appscale
pre-build-event
clipboard.js
omniauth-facebook
piracy-prevention
dynamics-nav-2016
dllimport
xenomai
django-urls
airbrake
graphics2d
keyup
rrule
mmwormhole
code-documentation
pseudo-class
post-commit-hook
tweenlite
mintty
terminate
authlogic
gae-quotas
c++builder-xe5
mbunit
printdialog
route-provider
sqlclr
dopostback
objectquery
thttpd
usertype
box2d-iphone
landscape-portrait
android-holo-everywhere
automationelement
clrstoredprocedure
inline-formset
cdonts
collectionviewsource
diagrams
undefined-index
binomial-heap
murmurhash
cuda.net
firefox-3
wspbuilder

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App