<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: get xml schema of current node?</title><link>https://www.infopathdev.com:443/forums/thread/70585.aspx</link><pubDate>Sun, 25 Sep 2011 17:41:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:70585</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/70585.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=70585</wfw:commentRss><description>&lt;p&gt;Assuming you&amp;#39;re using the 2007 OM, you can use this code to get an XmlDocument containing the form&amp;#39;s schema:&lt;/p&gt;&lt;font size="2"&gt;
&lt;blockquote&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XmlDocument&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; doc = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XmlDocument&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;();&lt;br /&gt;doc.Load(Template.OpenFileFromPackage(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;myschema.xsd&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;));&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;/font&gt;&amp;nbsp;once you&amp;#39;ve got that, you can search it using the XPath &lt;strong&gt;//xsd:element[@name = &amp;#39;&lt;/strong&gt;&lt;em&gt;&lt;u&gt;fieldName&lt;/u&gt;&lt;/em&gt;&lt;strong&gt;&amp;#39;]&lt;/strong&gt; to find the definition for a given field.&amp;nbsp; It could require some tricky handling depending on the fields&amp;#39; datatypes and whether they have their own attributes, but it should be possible.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Best of luck!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>get xml schema of current node?</title><link>https://www.infopathdev.com:443/forums/thread/70584.aspx</link><pubDate>Sun, 25 Sep 2011 14:27:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:70584</guid><dc:creator>jcmoon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/70584.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=70584</wfw:commentRss><description>Hi,


I&amp;#39;m writing C# managed code and I would like a loop to traverse a repeating table, checking for three conditions of fields:

1) cannot be blank
2) Read only
3)can be blank

Is there any way that my code can check the underlying xml schmea, to check, for instance if, a node is&amp;quot;RequiredString&amp;quot; for cannot be blank? THere&amp;#39;s got to be, just not sure how!

THANKS!</description></item></channel></rss>