Web Languages and Standards
--
Questions
--
Followers
Top Experts
i'll award the points for a working piece of code, an example xml document or dtd is not needeed, just the perl.
cheers
Peewee
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
many thanks for your reply, your example was complete, but it is not quite what i asked for, the xml i am processing will not have the dtd definition i must specify with Libxml what one to use.
hence if you change your input xml to:
<?xml version="1.0" encoding="ISO-8859-1"?>
<countrieslist>
<countries count="2">
<country id="1234">
<name>
<en>Italy</en>
<fr>Italie</fr>
</name>
</country>
<country id="7890">
<name>
<en>Spain</en>
<fr>Espagne</fr>
</name>
</country>
</countries>
</countrieslist>
how do i get libxml to parse it then?
many thanks
Peewee
# Here is the code, the XML does not contain DTD
use strict;
use XML::LibXML;
use IO::Handle;
# Load the DTD
my $dtd=XML::LibXML::Dtd->new
# Let's start the parsing
my $document=XML::LibXML->new
eval {
$document->validate($dtd);
}
if ($@ eq '') { # The $@ could contain the error
print "XML valid.\n";
} else {
print "XML not valid 'cause of $@ !\n";
}






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
what does this mean? and what is a more sensible value for it, can you provide some examples of what they could be:
"SOME // Public / ID / 1.0"
many thanks
Peewee
many thanks for your help here..
cheers
peewee

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Web Languages and Standards
--
Questions
--
Followers
Top Experts
Web development can range from developing the simplest static single page of plain text to the most complex web-based internet applications, electronic businesses, and social network services using a wide variety of languages and standards, including the familiar HTML, JavaScript and jQuery, ASP and ASP.NET, PHP, ColdFusion, CSS, PHP, Flex and Flash, but also the implementation of a broad list of standards including XML, WSDL, SSDL, VoiceXML and many more.