Aspose::Words::Markup::StructuredDocumentTagRangeStart::GetChildNodes method

StructuredDocumentTagRangeStart::GetChildNodes method

Returns a live collection of child nodes that match the specified types.

System::SharedPtr<Aspose::Words::NodeCollection> Aspose::Words::Markup::StructuredDocumentTagRangeStart::GetChildNodes(Aspose::Words::NodeType nodeType, bool isDeep) override

Examples

Shows how to get child nodes of StructuredDocumentTagRangeStart.

auto doc = MakeObject<Document>(MyDir + u"Multi-section structured document tags.docx");
auto tag =
    System::AsCast<StructuredDocumentTagRangeStart>(doc->GetChildNodes(NodeType::StructuredDocumentTagRangeStart, true)->idx_get(0));

std::cout << "StructuredDocumentTagRangeStart values:" << std::endl;
std::cout << "\t|Child nodes count: " << tag->GetChildNodes(Aspose::Words::NodeType::Any, false)->get_Count() << "\n" << std::endl;

for (const auto& node : System::IterateOver(tag->GetChildNodes(Aspose::Words::NodeType::Any, false)))
{
    std::cout << String::Format(u"\t|Child node type: {0}", node->get_NodeType()) << std::endl;
}

for (const auto& node : System::IterateOver(tag->GetChildNodes(NodeType::Run, true)))
{
    std::cout << "\t|Child node text: " << node->GetText() << std::endl;
}

See Also