Hello,I have written a perl script to copy files/EAs from one workarea to another. To save much needed time I am using the -x option to export/import the extended attributes as an XML string. For some reason some of the files are giving me "not well-formed / Unable to parse XML input" error. Does anyone know how to avoid this error? I tried using the -u option to encode and decode as UTF8 but I am either doing it wrong or have different problem.I am basically reading in the XML into a string, witting the XML to a file and then setting the attributes on the new file.Here are some snippets of the code. I tired converting the string to UTF8 which did avoid the error but the double byte characters were corrupted.###my ($getAttrib) = $iwhome . "\\bin\\iwextattr -xu";my ($setAttrib) = $iwhome . "\\bin\\iwextattr -s -xu";my $Attributes = qx($getAttrib $o 2>&1);#utf8::encode($Attributes);open XML, ">$TempXML" or die "can not open $TempXML\n";print XML "$Attributes\n";close(XML);my $SetAtt = `$setAttrib \"$n\" < $TempXML`;###Any help would be much appreciated!Thanks,-Chuck
Thanks Fish! I opened a ticket with IW for this issue and I was able to code around it.
<?xml version="1.0" encoding="UTF-8"?><ealist><ea><key>foo</key><value>foo value</value></ea><ea><key>bar</key><value></value></ea></ealist>