+wxHtmlTag *wxHtmlTag::GetFirstSibling() const
+{
+ if (m_Parent)
+ return m_Parent->m_FirstChild;
+ else
+ {
+ wxHtmlTag *cur = (wxHtmlTag*)this;
+ while (cur->m_Prev)
+ cur = cur->m_Prev;
+ return cur;
+ }
+}
+
+wxHtmlTag *wxHtmlTag::GetLastSibling() const
+{
+ if (m_Parent)
+ return m_Parent->m_LastChild;
+ else
+ {
+ wxHtmlTag *cur = (wxHtmlTag*)this;
+ while (cur->m_Next)
+ cur = cur->m_Next;
+ return cur;
+ }
+}
+
+wxHtmlTag *wxHtmlTag::GetNextTag() const
+{
+ if (m_FirstChild) return m_FirstChild;
+ if (m_Next) return m_Next;
+ wxHtmlTag *cur = m_Parent;
+ if (!cur) return NULL;
+ while (cur->m_Parent && !cur->m_Next)
+ cur = cur->m_Parent;
+ return cur->m_Next;
+}
+