xmerl - \n\r

Sanjaya Vitharana sanjaya@REDACTED
Fri Jun 23 15:02:26 CEST 2006


19> xmerl_scan:file('f1.xml',[{validation,true}]).
1007- fatal: {invalid_target_name," version=\""}
** exited: {fatal,{{invalid_target_name," version=\""},
                   {col,6}}} **

Reason: "escape characters" (\n\r) or "Space" in the beginning of file as below.

<?xml version="1.0"?><!DOCTYPE IVR SYSTEM "./ivr.dtd">
  <content type="file" filename="D:\\voicefilestest\\vsms\menu\Erecorded.vox">Your message has been recorded.</content>
  <content type="file" filename="D:\\voicefilestest\\vsms\menu\Epreesendlistenrecord.vox">Press 1 to send the message, press 2 to listen to the message, or press 3 to record the message again.</content>
    <key no="1"></key>
    <key no="2"></key>
    <key no="3"></key>

1.) <?xml version="1.0"?> -- must be in the staring point of a xml file ???
2.) how to avoid such situation ??? (without checking all xml files). Are there any way to tell parser to avoid those characters ???

Thanks in advance

Sanjaya Vitharana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060623/c438dae1/attachment.htm>

More information about the erlang-questions mailing list