Login
Register
Search
Menu
Home
Products
XML, SOAP, JSON, REST
Thunder Suite for COBOL and C
JSON Thunder
XML Thunder
Thunder Suite
Thunder FAQ
Tutorials
Thunder Wiki
Levelset History
XML Composer™
Overview
Features
FAQs
Tutorials
Levelset History
Brochure (PDF)
ExpressSOAP
ExpressSOAP Demos
ExpressSOAP Purchase
ExpressXML
ExpressXML Demo
ExpressXML Purchase
turboWSDL
CA Gen Solutions
Report Composer™
Overview
Features
FAQs
Levelset History
Bulk Generation
Report Composer™ Java File Option
Java Report Engine
Data Composer™
Overview
Features
FAQs
Levelset
Documents
Test Composer™
Overview
Features
Levelset
XML Composer™
SOA Composer for CA Gen
Overview
Features
SOA Composer Levelset History
DotNetNuke® Modules
Canam Wiki
Services
Support
Downloads
Activate License
Contact
Partners
Products
XML, SOAP, JSON, REST
Thunder Suite for COBOL and C
Thunder Wiki
Thunder Suite
•
JSON Thunder
•
XML Thunder
•
FAQs
•
Tutorials
•
Wiki
•
Levelset History
•
JSON Thunder Technical Details
•
XML Thunder Technical Details
Thunder Wiki for Thunder Suite, JSON Thunder & XML Thunder
Home
New Page
All Pages
Tags
Search
Back
Adding Processing Instructions to a Handler Definition
Processing Instructions appear at the beginning of many XML documents and are used by applications when parsing the document. They can include information such as the XML version and encoding. [image||{UP}XMLThunderWiki/AddingProcessingInstructions/1.gif] The following outlines the steps required to add Processing Instructions to your XML Thunder Handler design. There are two approaches described. The first approach applies when you are using an XML Schema to create your Handler design and the schema contains the processing instruction information. The second approach applies when you have an existing XML Handler definition and you would like to add Processing Instructions to it. ====Importing Processing Instructions from an XML Schema==== This approach can be used when you are creating a Handler design from an XML schema and the schema contains processing instructions. 1. Go to Tools -> Default Properties -> XML Rules and check the “Import XML declaration node” setting. [image||{UP}XMLThunderWiki/AddingProcessingInstructions/2.gif] [image||{UP}XMLThunderWiki/AddingProcessingInstructions/3.gif] When you create your handler design using the New Handler Design Wizard, it should appear as shown below. Processing Instruction information will be included. The version and encoding attribute nodes will have a Fixed Value (i.e. a constant) that will always be written when the XML Thunder Writer creates an XML document. Note that the “Has Data” property is automatically set to “False” and the “Fixed Value” property is populated with the constant. [image||{UP}XMLThunderWiki/AddingProcessingInstructions/4.gif] [image||{UP}XMLThunderWiki/AddingProcessingInstructions/5.gif] 2. Add additional Processing Instructions In some cases, you may need to add additional Processing Instruction information. For example, the XML schema may contain only the XML version information – as shown below. [image||{UP}XMLThunderWiki/AddingProcessingInstructions/6.gif] To add additional attributes to the Processing instruction (such as encoding), right click on the attribute list icon in the XML tree and choose “Add -> Attribute. [image||{UP}XMLThunderWiki/AddingProcessingInstructions/7.gif] Enter the name of the new Processing Instruction attribute (e.g. “encoding”). [image||{UP}XMLThunderWiki/AddingProcessingInstructions/8.gif] Set the “Has Data” property to “False” and set the “Fixed Value” that you would to appear in the XML documents that are created. [image||{UP}XMLThunderWiki/AddingProcessingInstructions/9.gif] ====Adding Processing Instructions to an Existing Handler Definition==== Sometimes you may want to add Processing Instructions to an existing Handler. Examples of when this may be necessary are: • You did not use an XML schema to create your XML Handler Definition (e.g. you used a copybook or header file and derived the XML structure, or you used a sample XML instance for the XML structure). • The schema does not contain Processing Instructions, but you would like to include them in your XML document. • You have an existing Handler Definition that did not import Processing Instructions and you would like to add them after the fact. The following outlines the approach for adding Processing Instructions to an existing Handler definition. 1. Click on XML Item -> Add -> Add P.I. Node. [image||{UP}XMLThunderWiki/AddingProcessingInstructions/10.gif] The Processing Instruction node will appear at the bottom of the Handler design. Set the node name to “xml”. [image||{UP}XMLThunderWiki/AddingProcessingInstructions/11.gif] 2. Drag the Processing Instruction Node to the Beginning of the XML Structure. To get the P.I. node to the beginning of the Handler design, drag and drop the node to the top. You may find it helpful to collapse the nodes under the root element (click the “-“ symbol next to a node to collapse its children). [image||{UP}XMLThunderWiki/AddingProcessingInstructions/12.gif] 3. Add Processing Instruction Attributes. Right-click on the Processing Instruction node and choose Add -> Add Attribute Node [image||{UP}XMLThunderWiki/AddingProcessingInstructions/13.gif] Set the “Has Data” property to “False” and set the “Fixed Value” that you would to appear in the XML documents that are created. [image||{UP}XMLThunderWiki/AddingProcessingInstructions/14.gif] To add additional attributes to the Processing instruction (such as encoding), right click on the attribute list icon in the XML tree and choose “Add -> Attribute. [image||{UP}XMLThunderWiki/AddingProcessingInstructions/15.gif] Enter the name of the new Processing Instruction attribute (e.g. “encoding”). [image||{UP}XMLThunderWiki/AddingProcessingInstructions/16.gif] Set the “Has Data” property to “False” and set the “Fixed Value” that you would to appear in the XML documents that are created. [image||{UP}XMLThunderWiki/AddingProcessingInstructions/17.gif]
Modified on 2013/09/26 15:04
by
SuperUser Account
Tags:
Definition
,
Processing Instructions
,
SOAP
,
Writer
,
XML
,
XML Thunder
Attributes
Buffer
Choice
COBOL
Copybook
Definition
Display Window
Download
Elements
Extended Character Sets
Extensible Option
Field Structures
Flag Fields
Handler Creation
Handler Definition
Help
History
JSON
Key Features
License
New Release
Node
Node Level
Processing Instructions
Read Ahead
Reader
SOAP
Support
Test Harness
Writer
XML
XML Schema
XML Thunder
Tags:
Rollback
Administrate
Permissions
Email
or Username
Password
need a reminder?
Username
Email
Password
First Name
Last Name
Copyright © 1994-2017 by Canam Software Labs, Inc.
Consent Management
•
Privacy Statement
•
Terms of Use
Copyright © 2018 by Canam Software Labs, Inc.