KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Using DOM COUNT XML Elements on Elements using a Namespace
PRODUCT: 4D | VERSION: 11.4 | PLATFORM: Mac & Win
Published On: July 23, 2009

When using the DOM Count XML elements on an element name that contains a namespace, you have to pass the fully qualified name (namespace + element name) to the DOM Count XML elements command. Otherwise the element may not be found.

Consider an element named TestElem with a namespace of FirstNS. Not using the namespace would produce the following code snippet:

elementName:="TestElem"
myCount:=DOM Count XML elements (elementRef; elementName)


It hould be rewritten to instead look like this:

elementName:="FirstNS:TestElem"
myCount:=DOM Count XML elements (elementRef; elementName)