| By Tom Schreck | Article Rating: |
|
| August 9, 2005 05:00 PM EDT | Reads: |
14,337 |
Lines 34-45 handle looping over any properties in ColdFusion's metadata, if any exist. For each property, I make a call to getXMLProperty(), which pulls the property node out of the XML document. Then I merge the results in with ColdFusion's metadata.
//loop over each property in meta data structure
for(z=1; z lte arraylen(arguments.stMetaData.properties); z=z+1){
propertyName = arguments.stMetaData.properties[z].name;
//retrieve property meta data from XML document
stPropertyDetail = getXMLProperty(property=propertyName);
//append each XML Meta Data to CFC property
for(x in stPropertyDetail){
arguments.stAllProperties[propertyName][x] = duplicate(stPropertyDetail[x]);
}
}
Lines 60-89 shows how I read the XML file in getXMLProperty () and search for the property using XPath query and how I return a structure containing the property's attributes:
<cfscript>
//parse XML file into a CF XML Object
xmlMetaData = xmlParse(strXML);
//search for passed property in XML Document
arProperty = xmlSearch(xmlMetaData,"
//properties/property[@name='#arguments.property#']");
//retrieve property attributes
stAttribs = arProperty[1].xmlAttributes;
return stAttribs;
</cfscript>
The net result is a merge of property metadata stored in an XML document with ColdFusion's metadata (see Figure 2). Once I have the merge complete, I can use this data to generate all of the cool functionality provided by cfcPowerTools.
Published August 9, 2005 Reads 14,337
Copyright © 2005 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Tom Schreck
Tom Schreck is a Macromedia certified ColdFusion MX 6.1 developer. He has been working with ColdFusion since 1997. Check out www.cfcPowerTools.com for more information on cfcPowerTools.
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe Flex Developer Earns $100K in New York City
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Adobe Betas Target RIAs and Cloud Computing
- Adobe Cans Another 9% of its Workforce
- Moyea DVD4Web Converter V2.0 Converts DVD to FLV Fast and Synchronously with Watermarks
- Adobe Fiddles with its Web Apps
- Adobe & Salesforce Cut Cloud Deal
- Hosting.com Launches ColdFusion 9 in the Cloud
- The Real Time Infrastructure Ultimatum
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Is Microsoft as Free as Open Source?
- Adobe Reader Sued
- The Planet Named “Bronze Sponsor” of Cloud Computing Expo
- Microsoft Expression Web Has Got Game
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe Flex Developer Earns $100K in New York City
- Bruce Chizen Joins Voyager Capital as Venture Partner
- My Top Seven Wishes From Adobe MAX 2009
- The Next Programming Models, RIAs and Composite Applications
- Where Are RIA Technologies Headed in 2008?
- Constructing an Application with Flash Forms from the Ground Up
- AJAX World RIA Conference & Expo Kicks Off in New York City
- CFEclipse: The Developer's IDE, Eclipse For ColdFusion
- Personal Branding Checklist
- Adobe Flex 2: Advanced DataGrid
- Has the Technology Bounceback Begun?
- Building a Zip Code Proximity Search with ColdFusion
- i-Technology Viewpoint: We Need Not More Frameworks, But Better Programmers
- The Asynchronous CFML Gateway
- Web Services Using ColdFusion and Apache CXF






























