Spaces:
Sleeping
Sleeping
Update pages/hari.py
Browse files- pages/hari.py +34 -8
pages/hari.py
CHANGED
|
@@ -304,15 +304,41 @@ def json_details_page():
|
|
| 304 |
st.session_state['page'] = "home"
|
| 305 |
|
| 306 |
# Semi-Structured Data - XML Page
|
| 307 |
-
def xml_details_page():
|
| 308 |
-
st.title("Semi-Structured Data - XML Details")
|
| 309 |
-
st.markdown("""
|
| 310 |
-
**XML** (eXtensible Markup Language) stores data in a hierarchical structure.
|
| 311 |
|
| 312 |
-
-
|
| 313 |
-
|
| 314 |
-
""
|
| 315 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
|
| 317 |
# Google Colab Link
|
| 318 |
st.markdown("<h5 style='color:blue;'>Download Jupyter Notebook or PDF with Code Examples</h5>", unsafe_allow_html=True)
|
|
|
|
| 304 |
st.session_state['page'] = "home"
|
| 305 |
|
| 306 |
# Semi-Structured Data - XML Page
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
|
| 308 |
+
st.markdown("<h1 style='text-align: center; color: blue;'>Handling XML Files</h1>", unsafe_allow_html=True)
|
| 309 |
+
|
| 310 |
+
st.markdown("<h2 style='color: green;'>What is XML?</h2>", unsafe_allow_html=True)
|
| 311 |
+
st.write("XML (Extensible Markup Language) is a markup language used for storing and transporting semi-structured data.")
|
| 312 |
+
|
| 313 |
+
st.markdown("<h2 style='color: orange;'>Characteristics of XML</h2>", unsafe_allow_html=True)
|
| 314 |
+
st.write("""
|
| 315 |
+
- <span style='color: purple;'>XML</span> is a markup language, meaning it uses tags to define the structure and content of data.
|
| 316 |
+
- <span style='color: purple;'>XML</span> is semi-structured, meaning it has a flexible structure that can be defined by the user.
|
| 317 |
+
- <span style='color: purple;'>XML</span> tags are not predefined, allowing users to create their own custom tags.
|
| 318 |
+
""", unsafe_allow_html=True)
|
| 319 |
+
|
| 320 |
+
st.markdown("<h2 style='color: orange;'>Basic Structure of XML</h2>", unsafe_allow_html=True)
|
| 321 |
+
st.write("""
|
| 322 |
+
- XML documents consist of elements, which are represented by tags.
|
| 323 |
+
- Tags have an opening and closing tag, with the content enclosed within.
|
| 324 |
+
- The basic structure of an XML tag is: `<openingtag>content</closingtag>`
|
| 325 |
+
""", unsafe_allow_html=True)
|
| 326 |
+
|
| 327 |
+
st.markdown("<h2 style='color: orange;'>Example of XML Data</h2>", unsafe_allow_html=True)
|
| 328 |
+
st.code("""
|
| 329 |
+
<persons>
|
| 330 |
+
<person>
|
| 331 |
+
<name>John Doe</name>
|
| 332 |
+
<age>30</age>
|
| 333 |
+
<gender>Male</gender>
|
| 334 |
+
</person>
|
| 335 |
+
<person>
|
| 336 |
+
<name>Jane Doe</name>
|
| 337 |
+
<age>25</age>
|
| 338 |
+
<gender>Female</gender>
|
| 339 |
+
</person>
|
| 340 |
+
</persons>
|
| 341 |
+
""", language="xml")
|
| 342 |
|
| 343 |
# Google Colab Link
|
| 344 |
st.markdown("<h5 style='color:blue;'>Download Jupyter Notebook or PDF with Code Examples</h5>", unsafe_allow_html=True)
|