<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20776.aspx</link><pubDate>Thu, 14 Jun 2007 15:11:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20776</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20776.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20776</wfw:commentRss><description>&lt;p&gt;Hey, you&amp;#39;re welcome! I think the reason why these contorsions are needed is because there is some obscure bug with reading the XML directly.&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20775.aspx</link><pubDate>Thu, 14 Jun 2007 15:05:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20775</guid><dc:creator>seadsead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20775.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20775</wfw:commentRss><description>&lt;p&gt;good point, lol, I think I&amp;#39;m losing it......&lt;/p&gt;&lt;p&gt;&amp;nbsp;I just find it rediculous that, &lt;/p&gt;&lt;p&gt;To read XML, you have to convert to text then back to XML, &lt;br /&gt;Why do we have to have a middle man??&lt;/p&gt;&lt;p&gt;anyways it works, &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;THANKS A BUNCH&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20772.aspx</link><pubDate>Thu, 14 Jun 2007 14:48:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20772</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20772.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20772</wfw:commentRss><description>I am not sure why it does not work - have not used the FSO in a while. But maybe you could just use &lt;strong&gt;ReadAll()&lt;/strong&gt; instead of ReadLine() and not worry about while loops...</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20771.aspx</link><pubDate>Thu, 14 Jun 2007 14:40:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20771</guid><dc:creator>seadsead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20771.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20771</wfw:commentRss><description>&lt;p&gt;Very Helpfull, thanks&lt;/p&gt;&lt;p&gt;would there be a reason why, I can&amp;#39;t use ReadLine in a Loop statement??&lt;/p&gt;&lt;p&gt;ex:&lt;/p&gt;&lt;p&gt;tmpTxt = SoftwareXML.ReadLine&amp;nbsp; &amp;#39; &amp;lt;-- Works&lt;/p&gt;&lt;p&gt;do while&amp;nbsp;true &lt;br /&gt;&amp;nbsp;if ( (tmpTxt = &amp;quot;&amp;quot;) or (tmpTxt = EOF))then&amp;nbsp;&lt;br /&gt;&amp;nbsp; Exit Do &lt;br /&gt;else&amp;nbsp;&lt;br /&gt;&amp;nbsp; tmpTxt = SoftwareXML.ReadLine&amp;nbsp;&amp;nbsp; &amp;#39; &amp;lt;-- Doesn&amp;#39;t Works&lt;br /&gt;&amp;nbsp;end if &lt;br /&gt;loop&lt;/p&gt;&lt;p&gt;&amp;nbsp;I just want to read through the file first&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20713.aspx</link><pubDate>Thu, 14 Jun 2007 01:47:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20713</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20713.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20713</wfw:commentRss><description>&lt;p&gt;Well,&amp;nbsp;loadXml takes an xml string of a form &amp;quot;&amp;lt;tag&amp;gt;&amp;lt;anotherTag/&amp;gt;...&amp;lt;/tag&amp;gt;&amp;quot;, not a path to a file. So first you need to load the text from file using FSO and then you can load it into an xml document via loadXml&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20701.aspx</link><pubDate>Wed, 13 Jun 2007 19:26:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20701</guid><dc:creator>seadsead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20701.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20701</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m trying to have an external Software list(in XML format) to read from,&amp;nbsp;that we can change if needed (New Specialty software available on our network)&lt;br /&gt;Right now I just want to write to an external Text file to make sure I&amp;#39;m getting stuff(Testing only)&lt;/p&gt;&lt;p&gt;this is what I&amp;#39;ve got so far:&lt;/p&gt;&lt;p&gt;Dim xmlDoc, nodeList&lt;/p&gt;&lt;p&gt;Set xmlDoc = XDocument.CreateDOM()&lt;br /&gt;xmlDoc.async = false xmlDoc.LoadXml(&lt;em&gt;path to XML File&lt;/em&gt;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set nodeList = xmlDoc.SelectNodes(&amp;quot;descendant::SoftwareList[Software/sName = *]&amp;quot;)&lt;br /&gt;&lt;strong&gt;or&lt;br /&gt;&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set nodeList = xmlDoc.GetElementsByTagName(&amp;quot;sName&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BOTH WORKED IN PREVIOUS FORMS&lt;/p&gt;&lt;p&gt;Dim fso, testFile&lt;br /&gt;Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;Set testFile = fso.CreateTextFile(&amp;quot;C:\Temp\testfile.txt&amp;quot;,True)&lt;br /&gt;&lt;br /&gt;testFile.WriteLine(&lt;em&gt;xmlDoc.GetElementsByTagName(&amp;quot;sName&amp;quot;).item(0).text&lt;/em&gt;)&amp;nbsp; &amp;#39;test for data &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^--- this is where the errors are coming from&lt;/p&gt;&lt;p&gt;testFile.Close&lt;/p&gt;&lt;p&gt;&lt;br /&gt;The ERROR I&amp;#39;m getting is:&amp;nbsp; &lt;strong&gt;Object required: &amp;#39;xmlDoc.GetElementsByTagName(...).item(...)&amp;#39;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;this is the test XML file.&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;ISO-8859-1&amp;quot; ?&amp;gt;&lt;br /&gt;&amp;lt;SoftwareList&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;Software&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sName&amp;gt;Adobe Reader 8&amp;lt;/sName&amp;gt; &lt;br /&gt;&amp;nbsp; &amp;lt;/Software&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;Software&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sName&amp;gt;WinZip 11.1&amp;lt;/sName&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/Software&amp;gt;&lt;br /&gt;&amp;lt;/SoftwareList&amp;gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I don&amp;#39;t understand what I&amp;#39;m doing wrong?&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20698.aspx</link><pubDate>Wed, 13 Jun 2007 18:47:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20698</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20698.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20698</wfw:commentRss><description>&lt;p&gt;So you can finally get your XML file into a DOM, right? Great!&lt;/p&gt;&lt;p&gt;If you share out our XML file and the code you use to read it maybe I could see why you&amp;#39;re failing to read the data.&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20695.aspx</link><pubDate>Wed, 13 Jun 2007 18:27:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20695</guid><dc:creator>seadsead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20695.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20695</wfw:commentRss><description>&lt;p&gt;LoadXml() seems to work great.&lt;/p&gt;&lt;p&gt;Now I&amp;#39;m having trouble reading nodes, or even getting a NodeList.&lt;/p&gt;&lt;p&gt;this is really starting to get on my nerves, lol&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20683.aspx</link><pubDate>Wed, 13 Jun 2007 13:34:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20683</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20683.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20683</wfw:commentRss><description>Well, if you can get it as text first &lt;strong&gt;then&lt;/strong&gt; you can get it as XML by doing LoadXml(). Let me know if the load-as-text trick works!</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20681.aspx</link><pubDate>Wed, 13 Jun 2007 13:29:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20681</guid><dc:creator>seadsead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20681.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20681</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve already tried this, and it works fine.&lt;/p&gt;&lt;p&gt;But my group&amp;nbsp;would rather have it in XML. (Though, if I can&amp;#39;t get this working with XML, then Txt it is, lol)&lt;/p&gt;&lt;p&gt;thanks again, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let me know if you come across a way to get XML working maybe.&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20661.aspx</link><pubDate>Tue, 12 Jun 2007 21:03:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20661</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20661.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20661</wfw:commentRss><description>&lt;p&gt;Hmm... this is strange... if you are running full-trust and the file is accessible, I am not sure what else could be wrong.&lt;/p&gt;&lt;p&gt;One thing you could try is to use the FSO object to load the file as text. Here is an MSDN example that shows you how to do this: &lt;a href="http://msdn2.microsoft.com/en-us/library/t58aa4dd.aspx"&gt;http://msdn2.microsoft.com/en-us/library/t58aa4dd.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If you can get the XML in this way then you can use the loadXml() method on the newly created DOM to suck the XML in.&lt;/p&gt;&lt;p&gt;Let me know if this workaround works!&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20660.aspx</link><pubDate>Tue, 12 Jun 2007 19:39:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20660</guid><dc:creator>seadsead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20660.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20660</wfw:commentRss><description>&lt;p&gt;I can only get it to work when the XML file is in the same folder as the form(s).&lt;/p&gt;&lt;p&gt;I really hope there is a way around this&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20657.aspx</link><pubDate>Tue, 12 Jun 2007 19:25:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20657</guid><dc:creator>seadsead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20657.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20657</wfw:commentRss><description>&lt;p&gt;Well,&lt;/p&gt;&lt;p&gt;&amp;nbsp;#1 Works, so thats out.&lt;/p&gt;&lt;p&gt;And, I don&amp;#39;t think the file is not accessible, because I&amp;#39;m modifying it.&amp;nbsp; How can it not be accessible?&lt;/p&gt;&lt;p&gt;I have a feeling this is gonna take me a while, lol&lt;/p&gt;&lt;p&gt;thanks for the input aswell.&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20656.aspx</link><pubDate>Tue, 12 Jun 2007 19:18:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20656</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20656.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20656</wfw:commentRss><description>&lt;p&gt;Couple of ideas:&lt;/p&gt;&lt;p&gt;1.&amp;nbsp;There is a problem with the certificate and so the form is not *really* running as full trust. To check this, try to run Application.Quit() from your code - if this fails, the form is not really executing as full trust&lt;/p&gt;&lt;p&gt;2. The file is not accessible so you get a true &amp;quot;access denied&amp;quot; (this is less likely, I think #1 is the more likely culprit)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Reading from an external XML file.</title><link>https://www.infopathdev.com:443/forums/thread/20655.aspx</link><pubDate>Tue, 12 Jun 2007 18:59:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20655</guid><dc:creator>seadsead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20655.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20655</wfw:commentRss><description>&lt;p&gt;I created a cert to test.&lt;/p&gt;&lt;p&gt;I am using IP2003, but I&amp;#39;m not trying to use the preview because of the trust problem.&lt;br /&gt;I launch it from the form externaly.&lt;/p&gt;&lt;p&gt;It&amp;#39;s been working fine until now.&lt;br /&gt;It&amp;#39;s only since i tried to load teh XML file that I&amp;#39;ve been getting this problem.&lt;br /&gt;I&amp;#39;ve tried from Network drives and Localy (i.e. C: drive)&lt;/p&gt;&lt;p&gt;any clues?&lt;/p&gt;</description></item></channel></rss>