Picture from wikipedia.com
In computing, Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both readable and machine-readable. The W3C's XML 1.0 Specification and several other related specifications—all of them free open standards—define XML.
The design goals of XML emphasize simplicity, generality, and usability across the Internet. It is a textual data format with strong support via Unicode for different human languages. Although the design of XML focuses on documents, the language is widely used for the representation of arbitrary data structures such as those used in web services.
Several schema systems exist to aid in the definition of XML-based languages, while programmers have developed many application programming interfaces (APIs) to aid the processing of XML data.
How to write xml code in android studio?
How to write xml code in android studio?
XML
extensible markup language
single tag; components / tags that stand alone
example:
<the name of the attribute />
multiple tags: components / tags that have other components in it
example:
<name of attribute component>
<the name of the attribute />
<the name of the attribute />
</ componentname>
basic syntax: written code in programming language
<the name of the component
attribute
attribute />
component name begins with a capital letter and uses the camelcase principle
camelcase: way of writing with every word begins with a capital letter and spliced
example: TextView, ImageView
properties: attributes of components
example: android: text = "hai", android: height "10dp", color, shape, width, height dsd
value (value) / attribute data must be quoted in quotes
multple tags can also be called with viewgroup
viewgroup is a component that holds other components
viewgroup is also called parent
the component present in the view group is called child
rootelement: outer parent of the layout
0 komentar