<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Data Type?</title><link>https://www.infopathdev.com:443/forums/thread/6720.aspx</link><pubDate>Tue, 14 Mar 2006 06:30:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6720</guid><dc:creator>potpourri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6720.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6720</wfw:commentRss><description>hi again Agni, &lt;br /&gt;I kept forgetting to post this back :p&lt;br /&gt;&lt;br /&gt;If this is a snippet of my myschema.xsd file:&lt;br /&gt;&lt;br /&gt;	&amp;lt;xsd:element name="grossEstimationItem"&amp;gt;&lt;br /&gt;		&amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;			&amp;lt;xsd:sequence/&amp;gt;&lt;br /&gt;			&amp;lt;xsd:attribute ref="my:hourly_rate"/&amp;gt;&lt;br /&gt;			&amp;lt;xsd:attribute ref="my:hours"/&amp;gt;&lt;br /&gt;		&amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;	&amp;lt;/xsd:element&amp;gt;&lt;br /&gt;	&amp;lt;xsd:element name="Gross_Est_Cost" nillable="true" type="xsd:double"/&amp;gt;&lt;br /&gt;	&lt;br /&gt;and in my code, i've defined the namespace to be:&lt;br /&gt;&lt;br /&gt;XDocument.DOM.setProperty("SelectionNamespaces", 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-03-04T02:16:49" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xmlns:xsd="http://www.w3.org/2001/XMLSchema"');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And later on, when I tried retrieve each node data type using:&lt;br /&gt;	var schemaDOM = XDocument.CreateDOM();&lt;br /&gt;	schemaDOM.load("myschema.xsd");&lt;br /&gt;        var type = schemaDOM.selectSingleNode("xsd:"+fieldname).text;&lt;br /&gt;&lt;br /&gt;It would issue an error msg of:&lt;br /&gt;        "Reference to undeclared namespace prefix: 'xsd'."&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Do you have any idea why trigger the error msg? I think I've declared the 'xsd' namespace correct, havent I?&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Data Type?</title><link>https://www.infopathdev.com:443/forums/thread/6719.aspx</link><pubDate>Tue, 19 Apr 2005 20:45:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6719</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6719.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6719</wfw:commentRss><description>Only way that I found was to load the XML schema into a IXMLDOMDocument and check for the datatype of a specific node by querying the xml document with "selectSingleNode" method.&lt;br /&gt;&lt;br /&gt;IXMLDOMDocument xd = thisXDocument.CreateDOM();&lt;br /&gt;xd.load("myschema.xsd");&lt;br /&gt;string type = xd.selectSingleNode(&amp;lt;xpath&amp;gt;).text;&lt;br /&gt;&lt;br /&gt;This is not the best way but this is the only solution that I can think of.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfopathDev India</description></item><item><title>Data Type?</title><link>https://www.infopathdev.com:443/forums/thread/4627.aspx</link><pubDate>Mon, 18 Apr 2005 01:18:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4627</guid><dc:creator>potpourri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4627.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4627</wfw:commentRss><description>Currently i'm using &amp;lt;node&amp;gt;.dataType method to extract the data type.&lt;br /&gt;But strangely this only either "string" or "null".&lt;br /&gt;So it will regard image, date/time and rich XHTML as "null" data type.&lt;br /&gt;&lt;br /&gt;Does anyone know how to grab the precise data type of a control?</description></item></channel></rss>