Professional Documents
Culture Documents
Fuego With XML Step by Step
Fuego With XML Step by Step
Fuego With XML Step by Step
1
Purchase Order XML Document
purchaseOrder
orderDate
shipTo
name
billTo street
city
items
item partNum
productName
quantity
USPrice
2
XML Feed Into a Fuego Process
3
Purchase Order XML Document
4
XML Schema Definition (XSD)
5
Expose the XSD
file:\C:\Student\XML\PO3.xsd
6
Wrapper PurchaseOrder Object
7
Method to Access XML File
4. Create a Method in this new wrapper object to retrieve and parse the
information in an XML file that uses this schema.
8
Add Logic to Access and Parse the XML
// "PurchaseOrder" is the root object in the XML file for this example.
// In production, do not hard code a local directory like this.
// It is only here in this example for clarity.
purchaseOrder = PurchaseOrder("file:/C:/yourDirectoryName/po2.xml")
display purchaseOrder.orderDate
display purchaseOrder.billTo.name
display purchaseOrder.shipTo.name
display purchaseOrder.items.item.partNum
9
Purchase Order Information Displayed
7. “billTo.name” displayed
10