1. Curious: Why use XPathNavigator Class over XMLDocument Class?
Any opinions on the best way to load, select nodes (anywhere in the tree), manipulate those nodes, and save the changes? Any reason I should change from just straight up manipulating the XMLDocument and use the XPathNavigator class? Is the performance is better then using the XMLDocument class to perform XPath queries? What is the most efficient method of manipulating and saving data changes? Cheers, -- Curious.
2. adding elements of XmlDocument A in XmlDocument B - CSharp/C#
3. Get all namespace prefix from XmlDocument class
Hi,
if I have xml document
<root xmlns:a="myNS1" xmlns:b="myNS2" xmlns="myNS">
<a:node1>value1</a:node1>
<b:node2>value2</b:node2>
<node3>value3</node3>
</root>
if I load the above xml in XmlDocument, I can get the namespaceURI "myNS1"
usnig .GetNamespaceOfPrefix("a")
Could someone tell me how to get/enumerate all namespace prefixes and
namespaceURIs?
Thanks very much!
John
4. How to transform a custom class into xmlDocument object - VB.Net
5. Slowness of XmlDocument Class
I'm working with the compact framework and trying to write a program that
will roll through a xml document and display the information in a listbox,
but after I open a file with a OpenFileDialog it takes up to 15 seconds to
load the file into the XmlDocument. Any Ideas on how to speed the code up.
My xml file is around 200k. Here is a sample of the code that i'm using.
lstCaches.Items.Clear();
OpenFileDialog GetGPX = new OpenFileDialog();
GetGPX.Filter = "GPX files (*.GPX)|*.gpx|All files (*.*)|*.*";
GetGPX.ShowDialog();
FileName = GetGPX.FileName;
if(FileName != "")
{
XmlDocument GpxDoc = new XmlDocument();
GpxDoc.Load(GetGPX.FileName);
}
Thanks,
Justin
6. Passing XmlDocument-derived class in a WebMethod
7. Load method of XmlDocument class fails for an invalid character
Hi, The error you are getting is valid.An ampersand is a reserved character in XML and it signals the beginning of an entity (in this case, a special character)So, " & " is illegal in XML.Instead of "&" you need to use the entity reference for the ampersand: that is it should be & other special characters in XML are: < for <; > for >; ' for '; and " for ". so you need to make your xml string valid before passing to LoadXML() function.(that is by replacing & with &) Hope this helps you out. Thanks and Regards, Manish Bafna. MCP and MCTS. "Roy" wrote: > Hi all, > There is a character in my xml file () that causes loading of an xml file > to a datatable to fail. In XML's header, I've changed the encoding property > from 8 to 16 (encoding="UTF-16"), but even this change didn't resolve the > issue. Is there anything else I need to do to resolve this loading issue? Or > Should I take another approach for loading xml (if there is one)? > Thanks in advance, > Roy >