Xmlsourcetype Follow

0
Avatar
Legacy Poster

Hi,

 

Are there any alternative options for the XMLSourceType?

 

The sample code provided with the documentation uses an example with XMLSourceType.ScriptFile.

 

 


// Initialize a new BarTender print engine

using (Engine btEngine = new Engine())

{

// Start the BarTender print engine

btEngine.Start();


// Run XML Script as a file

string XMLResponse = btEngine.XMLScript(@"c:\MyXMLScript.xml", XMLSourceType.ScriptFile);


// Display returned XML response

Console.WriteLine(XMLResponse);


// Stop the BarTender print engine

btEngine.Stop();

 

 

Would it be possible to use a local variable containing the XML data, rather than an XML file?

 

I am trying to scope out an integration with my current app and bartender.

I don't have access to #c at the moment, thus I cannot play with the methods.

 

 

-Robbie

 

 

1 comments

0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

Yes this can be passed as a string:

 

 


// Execute the XML string. btEngine.XMLScript(xmlScript, XMLSourceType.ScriptString);  

Check the BarTender HELP for a full reference. The details for this are found in the Engine Class topic.

Please sign in to leave a comment.