datatype and definition properties of DOM nodes

M

michael.totschnig

Hello,

I would like to find out something about the type of a contextnode. But
when I read the dataType and definition properties of the DOM node by

objNode = XDocument.View.GetContextNodes().item(0);
if (objNode.definition == null)
XDocument.UI.Alert("no definition found");
if (objNode.dataType == null)
XDocument.UI.Alert("no dataType found");

they do not seem to be set. Is there a reason for this, and is there
anotherway to find out structural information about the contextnode?

Regards,

Michael Totschnig
 
F

Franck Dauché

Hi Michael,

You may need to load you schema file (.xsd) and loop through it. I think
that you need to look for @type (attribute) to get the nature of nodes.

Regards,

Franck Dauché
 
M

michael.totschnig

Hello Franck,

thank you for your reply! Would that mean that I'd have to implement a
mini-schema processor of my own? I thought that the properties
"definition" and "dataType" mentioned in the MS DOM reference would
give immediate access to this information. But somehow they do not seem
to be implemented in the DOM object that Infopath provides.

Regards,

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top