Thanks for the replies on xml to styled text.
I ended up with this, an adaptation of your replies
and the method from the XML101 article in RBDeveloper 4.6

I see a performance hit but it works as advertised :-)

I imagine there must be a better way than
duplicating this for every node, but I am still dim on
declaring variables (oh, jeux de mot!)

------
  dim nodeList as XMLNodeList
  dim node as XmlNode
  dim numbersfound as XmlNodeList

  dim i,j,n,b,count As Integer
  dim l,titel, xqlstring,nr as String
  l=ListBoxBib.Cell(0,1)

  //xmltoEF
  dim xs, xr as XmlNode
  dim sr as StyleRun

*snip*

      xqlstring = "//ARTIKEL[ART_NR='" + NR + "']/descendant::*"
      numbersfound= xmldoc.Xql(xqlstring)

      count=numbersfound.Length - 1
      for b = 0 to count
        node=numbersfound.Item(b)
        select case node.Name
        case "ART_OVEREENKOMST"
          // xml to ef
          sr=new StyleRun
          sr.Bold=node.GetAttribute("bold")="True"
          sr.Italic=node.GetAttribute("italic")="True"
          sr.Underline=node.GetAttribute("underline")="True"
          sr.Size=val(node.GetAttribute("size"))
          if node.ChildCount>0 then
            node=node.Child(0)
            EditField1.AppendText(endofline + EndOfLine)
            sr.text=node.Value.ConvertEncoding(Encodings.UTF8)
          end if
          EditField1.StyledText.AppendStyleRun(sr)
        case ...
*snip*

Koen van Hees
Les Allées de St. Genis
299 Allée Diderot
01630 St Genis Pouilly
France
tel: +33 (0)4 50 42 08 78
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to