in reply to LibXML and parsing file with DTD

Your XML is valid ... the real issue is that your XPATH for TaxId, Length, Status and ReplacedBy are wrong. Those should be:

./Item[@Name="TaxId"]

-derby

Replies are listed 'Best First'.
Re^2: LibXML and parsing file with DTD
by AWallBuilder (Beadle) on Jul 29, 2010 at 12:39 UTC

    Thanks,I changed my code as you suggested and still code the same error.

    snippit of new code

    my($TaxId) = $DocSum->findnodes('./Item[@Name="TaxId"]'); print OUTFILE $TaxId->to_literal, "\t";

    From the error it looks like it doesn't like any of the xml entities all the way from the top nodes (ie. eSummary, DocSum

    error again

    No declaration for element eSummaryResult No declaration for element DocSum No declaration for element Id No declaration for element Item No declaration for attribute Name of element Item No declaration for attribute Type of element Item

      Hmmm ... what happens if you comment out the validate call?

      -derby

        Thanks! Once I commented out the validate call, it works

        I guess if the validate function doesn't like the xml files then it just dies?