Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tushar98644 committed Mar 28, 2024
1 parent 4db00b7 commit 664c5d8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions output/easy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ simple XML document to extract the director name for the second movie.

## Setting Up the Environment

### <u>**Section 1: Loading Libraries and XML String**</u>
### <u>Section 1: Loading Libraries and XML String</u>

``` r
library(xml2)
Expand Down Expand Up @@ -49,7 +49,7 @@ xml_string <- c( '<?xml version="1.0" encoding="UTF-8"?>',
- An XML string representing a list of movies is defined, including
details like **title**, **director**, **year**, and **genre**.

### <u>**Section 2: Parsing the XML Document**</u>
### <u>Section 2: Parsing the XML Document</u>

``` r
doc <- read_xml(paste(xml_string, collapse = ''))
Expand All @@ -71,7 +71,7 @@ doc

- The **parsed** XML document is stored in the variable doc.

### <u>**Section 3: Navigating the XML Document**</u>
### <u>Section 3: Navigating the XML Document</u>

``` r
tu_mama <- xml_child(doc, search = 2)
Expand Down Expand Up @@ -103,7 +103,7 @@ xml_children(tu_mama)
- The **xml_child** function is used to select a specific child node by
its index, in this case, the second movie.

### <u>**Section 4: Extracting director Information**</u>
### <u>Section 4: Extracting director Information</u>

``` r
director <- xml_child(tu_mama,"director")
Expand Down
8 changes: 4 additions & 4 deletions output/medium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of nested \<node\> elements under the root \<node\> element.

## Setting Up the Environment

### <u>**Section 1: Loading Libraries and parsing XML Content**</u>
### <u>Section 1: Loading Libraries and parsing XML Content</u>

``` r
library(XML)
Expand Down Expand Up @@ -99,7 +99,7 @@ doc

- The **parsed** XML document is stored in the variable xml_doc.

### <u>**Section 2:** Navigation of XML Tree</u>
### <u>Section 2: Navigation of XML Tree</u>

#### <u>2.1 Access the root Node</u>

Expand Down Expand Up @@ -223,7 +223,7 @@ tu_mama
- **xmlChildren(movies)$$\[2$$\]** accesses the second movie node from
the child nodes of “movies”.

### <u>**Section 3:** Inspecting first node</u>
### <u>Section 3: Inspecting first node</u>

#### <u>3.1 Inspecting contents of the children of movies node</u>

Expand Down Expand Up @@ -360,7 +360,7 @@ xmlValue(title1)
- **xmlValue(title1)** extracts the text content of the ‘title1’ node,
representing the title of the movie.

### <u>**Section 4:** Inspecting director node</u>
### <u>Section 4: Inspecting director node</u>

``` r
# Access the director node of 'good_will'
Expand Down
8 changes: 4 additions & 4 deletions output/medium/analysis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The medium test aims to **replicate** the **analysis** conducted in Section 41.1
knitr::opts_chunk$set(echo = TRUE)
```

### [**Section 1: Loading Libraries and parsing XML Content**]{.underline}
### [Section 1: Loading Libraries and parsing XML Content]{.underline}

```{r message=FALSE}
Expand Down Expand Up @@ -66,7 +66,7 @@ doc

- The **parsed** XML document is stored in the variable xml_doc.\

### [**Section 2:** Navigation of XML Tree]{.underline}
### [Section 2: Navigation of XML Tree]{.underline}

#### [2.1 Access the root Node]{.underline}

Expand Down Expand Up @@ -112,7 +112,7 @@ tu_mama

- **xmlChildren(movies)\[\[2\]\]** accesses the second movie node from the child nodes of "movies".

### [**Section 3:** Inspecting first node]{.underline}
### [Section 3: Inspecting first node]{.underline}

#### [3.1 Inspecting contents of the children of movies node]{.underline}

Expand Down Expand Up @@ -173,7 +173,7 @@ xmlValue(title1)

- **xmlValue(title1)** extracts the text content of the 'title1' node, representing the title of the movie.

### [**Section 4:** Inspecting director node]{.underline}
### [Section 4: Inspecting director node]{.underline}

```{r message=FALSE}
Expand Down

0 comments on commit 664c5d8

Please sign in to comment.