I'm new to programming.
How can xml make sense?
For example, in the case of HTML, tags such as
and
I learned that it can be set like this.
However, with this alone, you can decide the elements and attributes as you like, conversely, you can just name them, and the elements and attributes that you decide are HTML, as I mentioned earlier Isn't the tag itself meaningful? How do you use it?
Even if you think of it, you can search for tags in the xml file to find out what kind of data is available. I feel like that.
I'm currently studying app development at android studio, but since this describes the app layout in xml, it definitely has some meaning and is being processed accordingly I think.
Are you going to use something that makes sense in xml, like a compiler?
If so, I would like to know what kind of processing is done on attributes and elements. Is there such information in libraries and documentation?
I didn't know even if I looked it up and asked a question here
I'm sure there are some things that don't come true, but thank you.
※ Additional
Thank you very much for your answers.
Since tanat's answer fell to the most trap, I decided to be the best answer.
Error message
Applicable source code
Source code
Please describe what you tried for the problem here.
Supplemental information (FW/tool version etc.)Please provide more detailed information here.
-
Answer # 1
-
Answer # 2
You can write programs that are resistant to change.
For example, if the character string "ABC" is embedded everywhere in the code of several hundred lines,
Suppose you want to rewrite this as "XYZ".If you have written directly in the code, you must rewrite all ABCs to XYZ.
It is troublesome and leaks because of people.However, if you are coding in the form of acquiring XML elements, you can change everything in the code simply by rewriting the XML elements.
Related articles
- html - about processing when elements are layered in jquery hover event
- c ++ - about getting the number of elements in a two-dimensional array
- about xml acquisition with ajax
- python - about acquisition of elements using beautiful soup
- i have a question about adding elements to a 2d array that includes a set in a list in python
- html - i'm not sure about attributes and values in bootstrap
- about swift variables (meaning of exclamation mark)
- about the meaning of c ++ (struct-like) code
- about the meaning when there is a character string after the from clause in postgresql
- xpath (xml path) - about variable assignment to the part surrounded by double quotation marks
- xpath (xml path) - i have a question about writing xpath in xslt 20
- (html/php) about the meaning of
- get all p elements from xml file
- about the meaning of "e" in c #
- about the meaning of in the dart if statement
- c ++ - about swapping elements
- c - about the meaning of if (assignment expression)
- python - about the meaning of the surprise mark at the beginning of the py file
- about the space between elements in html and css
- java - there is no error when i enter the seek bar code, but please tell me why the app stops
- java - how to display the data of the item selected with the pulldown (spinner) in kotlin on the screen after transition
- java - i want to define in xml so that the width fits
- java - cannot display before update in listview
- java - cannot set view coordinates in android studio [beginner]
- i tried to use bottom navigation activity on android stdio, but no navigation is displayed in the design of activity_mainxml
- i want to specify the position of the view in java code without modifying xml
- xml - about the problem that you can build a program for screen transition and data migration with kotlin, but you can not execu
- java - usbmanager getdevicelist is always returned as null
It is the specifications and definitions related to XML that make XML meaningful.
The final implementation will be implementation within the application.
A common flow is
Parsing XML with a parser that allows the language to handle it as an object or array (at this point, it does not interpret the meaning of XML, but parses it mechanically according to the XML grammar)
Application uses parsed data according to specification (interpretation and execution of XML semantics here)
It is a flow. (1 and 2 may be executed at the same time.)
In this case
Android Developers Docs guide Layout resource
Is it?
I think there are many cases that exist as documents of applications that use XML.