# StructElement Class

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

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

```csharp
class StructElement : SystemIDisposable
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** `SystemIDisposable`

## 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/DotNetFramework/APDFL21.0.0PlusP1e/class/StructElement.md), [`StructTreeRoot`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/StructTreeRoot.md)

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

## Properties

### Document

```csharp
Document Datalogics.PDFL.StructElement.Document { get; }
```

### KidCount

```csharp
int Datalogics.PDFL.StructElement.KidCount { get; }
```

### PDFDict

```csharp
PDFDict Datalogics.PDFL.StructElement.PDFDict { get; }
```

### Type

```csharp
string Datalogics.PDFL.StructElement.Type { get; }
```

## Methods

### AddChild

```csharp
StructElement Datalogics.PDFL.StructElement.AddChild(string structType)
```

**Parameters**

- `structType` (`string`)

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

### AddMarkedContentRef

```csharp
void Datalogics.PDFL.StructElement.AddMarkedContentRef(Page page, Container container)
```

**Parameters**

- `page` ([`Page`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Page.md))
- `container` ([`Container`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/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.

### Dispose

```csharp
void Datalogics.PDFL.StructElement.Dispose()
```

**Returns:** `void`

### ParentIsTreeRoot

```csharp
bool Datalogics.PDFL.StructElement.ParentIsTreeRoot()
```

**Returns:** `bool`

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