Go Back   Velocity Reviews > Newsgroups > PERL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

PERL - XML Data validation in Perl

 
Thread Tools Search this Thread
Old 07-17-2003, 06:49 PM   #1
Default XML Data validation in Perl


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.


krishna
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump