Quantcast
Channel: Adobe Community : Popular Discussions - Adobe FrameMaker
Viewing all articles
Browse latest Browse all 23442

Doc Import Param to suppress XML import validation message

$
0
0

Hi,

 

I'm running a script where the first part is to import an xml document, then to make some changes to the imported xml.

Problem is, the xml may not always be valid. If it isn't I would like to still make the changes regardless.

Unfortunately, my code is not running as I end up with "Validation of XML file failed. Continue? " prompt.

Can I somehow suppress this ?  or is there a way to send the OK key hit - so my code can just continue without requiring any user interaction ?

 

 

var importParams = GetImportDefaultParams();

                         i=GetPropIndex(importParams,Constants.FS_ImportAsType);

                        importParams[i].propVal.ival=Constants.FV_TYPE_XML;

                         i=GetPropIndex(importParams,Constants.FS_FileIsXmlDoc);

                        importParams[i].propVal.ival=Constants.FV_DoOK;

                        i=GetPropIndex(importParams,Constants.FS_AlertUserAboutFailure);

                        importParams[i].propVal.ival=0;

                         i=GetPropIndex(importParams,Constants.FS_DontNotifyAPIClients);

                        importParams[i].propVal.ival=1;

                       // var importParams = GetImportDefaultParams();

                        i=GetPropIndex(importParams,Constants.FS_HowToImport);

                        importParams[i].propVal.ival=Constants.FV_DoByCopy;

                        var returnParams = new PropVals() ;

                alert("importing");

                        doc.Import (doc.TextSelection.end , filename, importParams, returnParams);

             app.ActiveDoc = doc;

 

do_something_else();

 

 

thanks!

Tracey


Viewing all articles
Browse latest Browse all 23442

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>