Hello All,

I am trying to learn how to use the XML modules and am running into a
problem parsing a document. I have written the
following script and am receiving the error:

 F:\scripts>xml_test.pl
Uncaught exception from user code:
        Uncaught exception from user code:

501 Protocol scheme 'f' is not supported
 f:/docbook/docbookx.dtd
Handler couldn't resolve external entity at line 2, column 90, byte 129
error in processing external entity reference at line 2, column 90, byte
129:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2CR1//EN"
"f:/docbook/docbookx.dtd">
============================================================================
====
=========^
<article>
 <articleinfo>
 at F:/Perl/site/lib/XML/Parser.pm line 185
--------------------end
error-----------------------------------------------------------------------
---------------------

from the error it seems that the parser does not like the doctype
decleration. Is there anyway around this?

Thanks

Ron Hill

--------------------start of
script----------------------------------------------------------------------
------------------
use XML::XPath;
use strict;
use diagnostics;
use warnings;
my $tmp_var = $/;
undef $/;
my $string = <DATA>;
$/=$tmp_var;

my $xp = XML::XPath->new(xml => $string);

foreach my $article ($xp->find('//article')->get_nodelist){
    print $article->find('title')->string_value;
    print $article->find('date');
    print "\n";
}

__DATA__
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2CR1//EN"
"f:/docbook/docbookx.dtd">
<article>
 <articleinfo>
  <title>Sequences are not being modified by ADJUST</title>
  <author>
   <firstname>LARRY</firstname>
   <surname>CULL</surname>
  </author>
  <keywordset>
   <keyword>UG</keyword>
   <keyword>HPCISC</keyword>
   <keyword>HP-UX</keyword>
   <keyword>8.05</keyword>
   <keyword>V9.1</keyword>
  </keywordset>
  <date>06/21/93</date>
  <invpartnumber>001-0172482</invpartnumber>
  <pubsnumber>0172482</pubsnumber>
 </articleinfo>
 <formalpara>
  <title>HARDWARE/SOFTWARE CONFIGURATION</title>
  <para>

All users of the ADJUST module of ROBOTICS.

</para>
 </formalpara>
 <formalpara>
  <title>SYMPTOM/PROBLEM</title>
  <para>

User runs ADJUST module of ROBOTICS but the cell sequences are not being
transformed thru error matrix.  All TPOINT positions in cell sequences
remain unchanged.

</para>
 </formalpara>
 <formalpara>
  <title>SOLUTION/WORKAROUND</title>
  <para>

The sequence used for measuring the calibration points contained the
command 'Set Device Tool Tpoint'.  Sequences will not be adjusted if
this command exists in the calibration sequence.  This is documented in
in the Robotics/Adjust user guide under the general guidelines for
creating a calibration sequence.

</para>
 </formalpara>
 <formalpara>
  <title>REFERENCES/NOTES</title>
  <para>

For more information see section 4.2 'The Calibration Sequence' of the
Robotics/Adjust User Guide.

</para>
 </formalpara>
</article>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to