<?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: Verifying node</title><link>https://www.infopathdev.com:443/forums/thread/3990.aspx</link><pubDate>Tue, 13 Feb 2007 06:20:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3990</guid><dc:creator>elektrocad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3990.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3990</wfw:commentRss><description>Hello,&lt;br /&gt;&lt;br /&gt;Thanks for your fast reply, but it's not working.&lt;br /&gt;I'm programming in Microsoft Visual Basic 2005 Express Edition and I'm working with XML files (create, modify, open, read ....).&lt;br /&gt;In the first line &lt;i&gt;Dim Node As System.Xml.XmlNode = m_xmld.DocumentElement.SelectSingleNode("my:fTotalcuTVA")&lt;/i&gt; I've got the next message from the compilator:&lt;br /&gt;"Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function."&lt;br /&gt;And this is the reason because I was using the namespacemanager.&lt;br /&gt;I my code I haven't got this message, but it's not working.&lt;br /&gt;&lt;br /&gt;I was checking on the NET about "how to verify if a node exist or not in an XML file", but I found just similary with your code.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Feri</description></item><item><title>Re: Verifying node</title><link>https://www.infopathdev.com:443/forums/thread/3989.aspx</link><pubDate>Mon, 12 Feb 2007 18:51:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3989</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3989.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3989</wfw:commentRss><description>Hi eng. Nagy Ferenc, and welcome to the forums!&lt;br /&gt;&lt;br /&gt;I haven't worked with VBScript a lot, but you should be able to change your code to the below.  I don't think you need a namespace manager when working with InfoPath.&lt;br /&gt;&lt;br /&gt;Dim Node As System.Xml.XmlNode = m_xmld.DocumentElement.SelectSingleNode("my:fTotal")&lt;br /&gt;If Not Node Is Nothing Then&lt;br /&gt;cell6.Value = Node.InnerText&lt;br /&gt;row.Cells.Add(cell6)&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;Although I'm not sure what row.Cells.Add() does - is this an Excel smart doc? I'm not sure how much help we'll be able to offer with that.</description></item><item><title>Verifying node</title><link>https://www.infopathdev.com:443/forums/thread/1845.aspx</link><pubDate>Mon, 12 Feb 2007 14:55:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1845</guid><dc:creator>elektrocad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1845.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1845</wfw:commentRss><description>Hello,&lt;br /&gt;&lt;br /&gt;I want to verify with a VB code if a node in an XML file exist or not. &lt;br /&gt;&lt;br /&gt;My code is:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Dim nod As System.Xml.XmlNamespaceManager = New System.Xml.XmlNamespaceManager(m_xmld.NameTable)&lt;br /&gt;            Dim Node As System.Xml.XmlNode = m_xmld.DocumentElement.SelectSingleNode("fTotal", nod)&lt;br /&gt;            If Not m_xmld.SelectSingleNode("fTotal", nod) Is Nothing Then&lt;br /&gt;                cell6.Value = m_xmld.GetElementsByTagName("my:fTotal").Item(0).InnerText&lt;br /&gt;                row.Cells.Add(cell6)&lt;br /&gt;            End If&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And this is not working, he never step into the IF.&lt;br /&gt;This code is in a cycle, and this source is reading some datas from XML files. The "my:fTotal" node exist in some files.&lt;br /&gt;A have to verify if exist this node or not because this line: &lt;br /&gt;&lt;i&gt;cell6.Value = m_xmld.GetElementsByTagName("my:fTotal").Item(0).InnerText&lt;br /&gt;&lt;/i&gt; returns me an error is the node doesn't exist.&lt;br /&gt;&lt;br /&gt;Please help me.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;eng. Nagy Ferenc</description></item></channel></rss>