on ‎2008 Jan 23 12:18 PM
Hi Gurus,
Please provide me the difference between element and attribute.
It would be great,if I can get some example with exact usage.
Regards,
MohanRaj
Request clarification before answering.
Hi,
Element is everything from (including) the element's start tag to (including) the element's end tag.
An element can contain other elements, simple text or a mixture of both. Elements can also have attributes.
Attributes often provide information that is not a part of the data. In the example below, the file type is irrelevant to the data, but important to the software that wants to manipulate the element.
In case you use the JDBC Adapter, for example. The muster XML-SQL from help.sap.com use attribute action to describe what kind of action should be performed, but action does not belongs to Payload, for example the content you want to insert into one table, does NOT contain action.
<root>
<StatementName1>
<dbTableName action=UPDATE | UPDATE_INSERT>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2new</col2>
</access>
<key1>
<col2>val2old</col2>
<col4>val4</col4>
</key1>
<key2>
<col2>val2old2</col2>
</key2>
</dbTableName>
</StatementName1>
regards,
Hai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.