将孩子收藏给父母

时间:2014-05-22 14:15:41

标签: vb.net itext

我试图在获取死书签链接时显示错误,编写递归函数来遍历孩子和主书签,我可以追踪死书签,但我想将父标题显示为错误用户。希望有可能`?但我不确定,如何实现这一目标。

Private Sub bookmarkGlobalSetting(ByRef bookRoot As List(Of Dictionary(Of String, Object)))

    For bk = bookRoot.Count - 1 To 0 Step -1
        'For Each bkMarkObj As Dictionary(Of String, Object) In bookmarks
        Dim bkMarkObj As Dictionary(Of String, Object) = bookRoot.Item(bk)
        Dim currentText As String = ""

        For bkInner = bkMarkObj.Count - 1 To 0 Step -1

            Dim bkKV As String = bkMarkObj.ElementAt(bkInner).Key

            If bkKV = "Named" Then
                If Not namedDestinationTargets.ContainsKey(bkMarkObj.Item(bkKV)) Then
                    '<here> instead of child title, can i get parent title
                    mstrErrorReport &= "Bookmark error - " & bkMarkObj.Item("Title") & " - Named destination wrong" & vbCrLf
                End If
            ElseIf bkKV = "Kids" Then
                bookmarkGlobalSetting(bkMarkObj.Item(bkKV))
            End If

        Next

    Next

End Sub

0 个答案:

没有答案