GetXMLNodeCDATA()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

GetXMLNodeCDATA()

Post by Flype »

Code: Select all

Procedure.s GetXMLNodeCDATA(*node)
  
  If *node
    *node = ChildXMLNode(*node)
    If *node And XMLNodeType(*node) = #PB_XML_CData
      ProcedureReturn GetXMLNodeText(*node)
    EndIf
  EndIf
  
EndProcedure
while doing some tests with the xml lib, i needed to read some CDATA values.

and it's easier with such a function which i will need to use very often.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer