0
Answer

MsgBoard.xml error in XmlDocument

Markus.Bach

Markus.Bach

12y
2.1k
1
Hi guys, I don't know if this is the perfect place for my question. If not then please drop where do I have to send it. My problem is the following: I have a function as follows: > private void DoSend() > { > XmlDocument xd = new XmlDocument(); > xd.Load(Page.Server.MapPath("Content/msgBoard.xml")); > > > XmlDocumentFragment docFrag = xd.CreateDocumentFragment(); > > XmlNode currNode = xd.DocumentElement; > > if (currNode.ChildNodes.Count > 10) > { > currNode.RemoveChild(currNode.LastChild); > } > > docFrag.InnerXml = > "SomeText"; > > currNode.InsertBefore(docFrag, currNode.FirstChild); > > xd.Save(Page.Server.MapPath("Content/msgBoard.xml")); > > Xml2.DocumentSource="Content/msgBoard.xml"; > Xml2.TransformSource="Content/Content.xslt"; > } If this function runs I got the following msgBoard.xml: > > > <----- here is my problem .... > > SomeText > > > Why has "item" node this "xmlns" attribute ? How can I turn this off, if I can? Thanks for any reply.