Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > XML Data validation in Perl

Reply
Thread Tools

XML Data validation in Perl

 
 
krishna
Guest
Posts: n/a
 
      07-17-2003
I have an XML file like....

<DateCreated>
<Year>2000</Year>
<Month>09</Month>
<Day>25</Day>
</DateCreated>
<DateCreated>
<Month>10</Month>
<Day>28</Day>
</DateCreated>

I need to validate all the elements between <DateCreated> and
</DateCreated> each time.ie I want to read the first set of records
<DateCreated>
<Year>2000</Year>
<Month>09</Month>
<Day>25</Day>
</DateCreated>
Validate it. If they look good ie - Year/Month/Day elements preset,
then write them out to a file.

Then read the next set
<DateCreated>
<Month>10</Month>
<Day>28</Day>
</DateCreated>

Validate it. It set is malformed ie - Year/Month/Day any one tag
missing, I need to toss that out, and continue reading the next set.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add validation rule for url in the validation-rule.xml ,I added some thing like this but......... shailajabtech@gmail.com Java 0 10-12-2006 08:36 AM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
Struts Validation Framework: suppressing startup output from validation.xml javadude Java 0 02-16-2005 05:37 PM
XML schema validation of one xml block based on values from another xml block Andy XML 0 11-18-2004 11:04 PM
Complex validation of business rules possible with XML Schema? Any other validation "languages"? Mike XML 1 11-21-2003 07:27 PM



Advertisments