0

I am working on a SOAP app, and since it basically uses XML as it's data container, I became curious on what the correct terms for the XML elements are.

For example we have header, body, envelope, but what are is the soap actions called?

I am specifically wondering what the <something_something> field is called?

And inside a soap action one can also find keys and their values such as for example <thisIsAKey>andThisIsItsValue</thisIsAKey>

What is <thisIsAKey></thisIsAKey> called and what is andThisIsItsValue value called?

Are they called just keys and values or what?

I tried to google for XML Protocol.

Evan Davis
  • 35,493
  • 6
  • 50
  • 57
vaid
  • 1,390
  • 12
  • 33
  • Anything in `<>` is called a tag in XML or HTML. The first one I would call the opening tag and the `>` i would call the closing tag. I would call the text between the tags the value. In Javascript, the content between two tags is called innerHTML or innerText – geokavel Oct 15 '15 at 22:46

1 Answers1

2

Look to the W3C XML Recommendation for answers regarding proper terminology for XML elements and attributes:

[Definition: Each XML document contains one or more elements, the boundaries of which are either delimited by start-tags and end-tags, or, for empty elements, by an empty-element tag. Each element has a type, identified by name, sometimes called its "generic identifier" (GI), and may have a set of attribute specifications.] Each attribute specification has a name and a value.

So, for your example, with an attribute added:

  • Element: <thisIsAKey attrname="attrval">andThisIsItsValue</thisIsAKey>
  • Element name: thisIsAKey
  • Start tag: <thisIsAKey>
  • End tag: </thisIsAKey>
  • Content: andThisIsItsValue
  • Attribute: attrname="attrval"
  • Attribute name: attrname
  • Attribute value: attrval
kjhughes
  • 106,133
  • 27
  • 181
  • 240