XML attributes and SOAP

wxdqz

New Member
Sorry for the long question but its a touchy subject and I wanted to clarifyeverything so that an answer will have more meaning to others within my group.We are developing XML for a business application. Currently we use attributesto help define a node within the document.<source value=http://forums.devx.com/archive/index.php/"1" name="Money Profit Accounts"><investments><fund value="ABC"><fundid>ABC</fundid><balance>100</balance><!--and about 20 other elements--></fund></investments></source>For the most part it helps us quickly look through the file and debug problems...somethingthat has come in handy. Anyway, one of our R&D guys took a look at SOAP 1.1specification and came to the conclusion that the future XML tools such asSOAP will not allow us to work with XML that contains attributes (exceptthose specifically defined in SOAP). From what I can tell in reading manyarticles on the web I have not come to this conclusion myself. Of coursethere is that never ending argument of element or attribute but I have neverheard that attributes would be made obsolete. Are attributes bad in the sensethat future tools will place restrictions on XML such that attributes CANNOTbe used?Ex.<request><transfer planid="55555" ssnum="101010006"><record part="1" of="3"><fund>A</fund><percent>30</percent></record><record part="2" of="3"><fund>B</fund><percent>30</percent></record><record part="3" of="3"><fund>C</fund><percent>40</percent></record></transfer></request>The argument is that if we go with attributes now we will have to redesignour application later or not be able to use SOAP, BizTalk, etc in the futurewithout a big conversion effort (I don't understand the concern over conversioneffort since moving an attribute to an element isnt a big deal and the factis we are going to have to redesign to use SOAP anyway). I always thoughtthat XML was freeform and as long as our business object was prepared touse the attribute it would be okay to use it. It looks to me like SOAP hasa way to take XML and create arrays and Types for use in an application,but our application is still going to have to be prepared to use those arrays,types, etc anyway. If our app is prepared to use the RAW XML now it willwork now and also with the future tools...it just may not be possible touse some features that automatically generate arrays and types for an application(Im just guessing here from a brief glance at SOAP)
 
Back
Top