# StructElement Class

> Internal wrapper for a single node in the PDF logical structure tree.

- Product: Adobe PDF Library 21
- Language: Java
- Version: APDFL21.0.0PlusP1c
- HTML page: https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/StructElement
- Version index: https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/llms.txt

```java
class StructElement
```

**Namespace:** `com::datalogics::PDFL`

## Description

Internal wrapper for a single node in the PDF logical structure tree. Owns a non-owning reference to its CDocument. Exposes type (/S) access, the backing dict (for arbitrary attribute reads/writes), child creation, and marked-content reference insertion.

**Referenced by:** [`StructElement`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/StructElement.md), [`StructTreeRoot`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/StructTreeRoot.md)

**Uses types:** [`Container`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/Container.md), [`Document`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/Document.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/PDFDict.md), [`Page`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/Page.md), [`StructElement`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/StructElement.md)

## Methods

### addChild

```java
StructElement com.datalogics.PDFL.StructElement.addChild(String structType)
```

**Parameters**

- `structType` (`String`)

**Returns:** [`StructElement`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/StructElement.md)

### addMarkedContentRef

```java
void com.datalogics.PDFL.StructElement.addMarkedContentRef(Page page, Container container)
```

**Parameters**

- `page` ([`Page`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/Page.md))
- `container` ([`Container`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/Container.md))

**Returns:** `void`

Insert a marked-content reference using the given Container. `/StructParents` on the page and the parent tree are wired automatically.

### delete

```java
synchronized void com.datalogics.PDFL.StructElement.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.StructElement.delete()
```

**Returns:** `synchronized void`

### finalize

```java
void com.datalogics.PDFL.StructElement.finalize()
```

*protected*

**Returns:** `void`

### getDocument

```java
Document com.datalogics.PDFL.StructElement.getDocument()
```

**Returns:** [`Document`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/Document.md)

### getKidCount

```java
int com.datalogics.PDFL.StructElement.getKidCount()
```

**Returns:** `int`

### getPDFDict

```java
PDFDict com.datalogics.PDFL.StructElement.getPDFDict()
```

**Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1c/class/PDFDict.md)

### getType

```java
String com.datalogics.PDFL.StructElement.getType()
```

**Returns:** `String`

### parentIsTreeRoot

```java
boolean com.datalogics.PDFL.StructElement.parentIsTreeRoot()
```

**Returns:** `boolean`

True when this element's immediate parent is the struct tree root. Avoids allocating a CStructElement wrapper just to discard it.
