Altova Mailing List Archives


Re: XMl error: Namespace Manager or XsltContext needed.

From: XMLnewbieUrgentplshelp@-----------.---------.---
To: NULL
Date: 2/16/2006 8:39:00 AM
Thanks a lot for your quick and correct response Martin. I appreciate it by 
my heart.God bless u.

Now, when I run my program, I don't get that error, but another: "Can't 
parse Login information. Object reference not set to an instance of an 
object".

Since, I have the exception"Can't parse Login information", in 
ParseLoginResponse function, but I have noticed, when I compile the program, 
I get the warning" Function SendXmlRequest doesn't return a value on all code 
paths. A NullReference exception could occur at runtime'. Do u think, I am 
getting the above error due to
 "SendXmlRequest function", if yes how should I fix it.

Once again, I appreciate and thankyou in advance for your help.God bless u.



"Martin Honnen" wrote:

> 
> 
> XML newbie: Urgent pls help! wrote:
> 
> 
> >             'Instantiate an XmlNamespaceManager object
> > 
> >             'Dim nsmgr As XmlNamespaceManager
> > 
> >             'nsmgr = New XmlNamespaceManager(filterDoc.NameTable)
> 
> Those two lines are correct, so comment them out.
> 
> 
> >             'nsmgr.AddNamespace("SelectionLanguage", "XPath")
> 
> Remove that line, it is nonsense.
> 
> > 
> >             'nsmgr.AddNamespace("SelectionNamespaces", 
> > "xmlns:ns='urn:schemas -tms:LoginResponse'")
> 
> That too, you simply need
>    msmgr.AddNamespace("ns", "urn:schemas -tms:LoginResponse")
> then you can use the prefix ns in your XPath expressions:
>    loginDom.SelectSingleNode("ns:LoginResponse/ns:Status", nsmgr)
> 
> Please don't post hundreds of lines, try to isolate things first, then 
> post the lines (say 5 or 10 or maybe 20) where the problem occurs.
> 
> 
> -- 
> 
> 	Martin Honnen --- MVP XML
> 	http://JavaScript.FAQTs.com/
> 

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.