DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Public Member Functions | Private Attributes | Friends | List of all members
DSRXMLCursor Class Reference

Class for XML document cursors. More...

## Public Member Functions
| DSRXMLCursor ()
| default constructor
| DSRXMLCursor (const DSRXMLCursor &cursor)
| copy constructor More...
virtual | ~DSRXMLCursor ()
| destructor
DSRXMLCursor & | operator= (const DSRXMLCursor &cursor)
| assignment operator More...
OFBool | valid () const
| check whether cursor is valid. More...
DSRXMLCursor & | gotoNext ()
| set cursor to next XML node (same level). More...
DSRXMLCursor & | gotoChild ()
| set cursor to first XML child node (next lower level). More...
DSRXMLCursor | getNext () const
| get cursor pointing to next XML node (same level). More...
DSRXMLCursor | getChild () const
| get cursor pointing to first XML child node (next lower level). More...

## Private Attributes
xmlNodePtr | Node
| pointer to the associated 'libxml' node

## Friends
class | DSRXMLDocument

## Detailed Description

Class for XML document cursors.

This class encapsulates the access to the 'libxml' node pointer and, therefore, allows to replace the XML library with little effort (if required).

## Constructor & Destructor Documentation

## ◆ DSRXMLCursor()

DSRXMLCursor::DSRXMLCursor | ( | const DSRXMLCursor & | cursor | ) |

copy constructor

Parameters

  cursor | cursor object to be copied

## Member Function Documentation

## ◆ getChild()

DSRXMLCursor DSRXMLCursor::getChild | ( |  | ) | const

get cursor pointing to first XML child node (next lower level).

This cursor object is not modified.

Returns
  copy of the requested cursor object (might be invalid)

## ◆ getNext()

DSRXMLCursor DSRXMLCursor::getNext | ( |  | ) | const

get cursor pointing to next XML node (same level).

This cursor object is not modified.

Returns
  copy of the requested cursor object (might be invalid)

## ◆ gotoChild()

DSRXMLCursor& DSRXMLCursor::gotoChild | ( |  | ) |

set cursor to first XML child node (next lower level).

Blank (empty or whitespace only) nodes are ignored/skipped.

Returns
  reference to this cursor object (might be invalid)

## ◆ gotoNext()

DSRXMLCursor& DSRXMLCursor::gotoNext | ( |  | ) |

set cursor to next XML node (same level).

Blank (empty or whitespace only) nodes are ignored/skipped.

Returns
  reference to this cursor object (might be invalid)

## ◆ operator=()

DSRXMLCursor& DSRXMLCursor::operator= | ( | const DSRXMLCursor & | cursor | ) |

assignment operator

Parameters

  cursor | cursor object to be copied

Returns
  reference to this cursor object after 'cursor' has been copied

## ◆ valid()

OFBool DSRXMLCursor::valid | ( |  | ) | const
| inline

check whether cursor is valid.

Valid means that the cursor points to a valid XML node.

Returns
  OFTrue if valid, OFFalse otherwise

The documentation for this class was generated from the following file:

- dcmsr/include/dcmtk/dcmsr/dsrxmlc.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1