Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteRootBoundElementTo()

void System.Xml.XmlBoundElement.WriteRootBoundElementTo ( DataPointer dp,
XmlWriter w )
inlineprivate

Definition at line 256 of file XmlBoundElement.cs.

257 {
258 XmlDataDocument xmlDataDocument = (XmlDataDocument)OwnerDocument;
259 w.WriteStartElement(dp.Prefix, dp.LocalName, dp.NamespaceURI);
260 int attributeCount = dp.AttributeCount;
261 bool flag = false;
262 if (attributeCount > 0)
263 {
264 for (int i = 0; i < attributeCount; i++)
265 {
266 dp.MoveToAttribute(i);
267 if (dp.Prefix == "xmlns" && dp.LocalName == "xsi")
268 {
269 flag = true;
270 }
271 WriteTo(dp, w);
272 dp.MoveToOwnerElement();
273 }
274 }
275 if (!flag && xmlDataDocument._bLoadFromDataSet && xmlDataDocument._bHasXSINIL)
276 {
277 w.WriteAttributeString("xmlns", "xsi", "http://www.w3.org/2000/xmlns/", "http://www.w3.org/2001/XMLSchema-instance");
278 }
280 if (dp.IsEmptyElement)
281 {
282 w.WriteEndElement();
283 }
284 else
285 {
286 w.WriteFullEndElement();
287 }
288 }
override void WriteTo(XmlWriter w)
static void WriteBoundElementContentTo(DataPointer dp, XmlWriter w)
override XmlDocument OwnerDocument
Definition XmlElement.cs:49

References System.Xml.Dictionary, System.Xml.XmlElement.OwnerDocument, System.Xml.XmlBoundElement.WriteBoundElementContentTo(), and System.Xml.XmlBoundElement.WriteTo().

Referenced by System.Xml.XmlBoundElement.WriteTo().