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

◆ Initialize()

void MS.Internal.Xml.Cache.XPathDocumentBuilder.Initialize ( XPathDocument doc,
IXmlLineInfo lineInfo,
string baseUri,
XPathDocument::LoadFlags flags )
inline

Definition at line 166 of file XPathDocumentBuilder.cs.

167 {
168 _doc = doc;
169 _nameTable = doc.NameTable;
170 _atomizeNames = (flags & XPathDocument.LoadFlags.AtomizeNames) != 0;
171 _idxParent = (_idxSibling = 0);
172 _elemNameIndex = new XPathNodeRef[64];
173 _textBldr.Initialize(lineInfo);
174 _lineInfo = lineInfo;
175 _lineNumBase = 0;
176 _linePosBase = 0;
177 _infoTable = new XPathNodeInfoTable();
178 XPathNode[] page;
179 int idxText = NewNode(out page, XPathNodeType.Text, string.Empty, string.Empty, string.Empty, string.Empty);
181 _idxNmsp = NewNamespaceNode(out _pageNmsp, _nameTable.Add("xml"), _nameTable.Add("http://www.w3.org/XML/1998/namespace"), null, 0);
183 if ((flags & XPathDocument.LoadFlags.Fragment) == 0)
184 {
185 _idxParent = NewNode(out _pageParent, XPathNodeType.Root, string.Empty, string.Empty, string.Empty, baseUri);
187 }
188 else
189 {
191 }
192 }
int NewNode(out XPathNode[] page, XPathNodeType xptyp, string localName, string namespaceUri, string prefix, string baseUri)
int NewNamespaceNode(out XPathNode[] page, string prefix, string namespaceUri, XPathNode[] pageElem, int idxElem)
void SetRootNode(XPathNode[] pageRoot, int idxRoot)
void SetCollapsedTextNode(XPathNode[] pageText, int idxText)
void SetXmlNamespaceNode(XPathNode[] pageXmlNmsp, int idxXmlNmsp)
string Add(char[] array, int offset, int length)

References MS.Internal.Xml.Cache.XPathDocumentBuilder._atomizeNames, MS.Internal.Xml.Cache.XPathDocumentBuilder._doc, MS.Internal.Xml.Cache.XPathDocumentBuilder._elemNameIndex, MS.Internal.Xml.Cache.XPathDocumentBuilder._idxNmsp, MS.Internal.Xml.Cache.XPathDocumentBuilder._idxParent, MS.Internal.Xml.Cache.XPathDocumentBuilder._idxSibling, MS.Internal.Xml.Cache.XPathDocumentBuilder._infoTable, MS.Internal.Xml.Cache.XPathDocumentBuilder._lineInfo, MS.Internal.Xml.Cache.XPathDocumentBuilder._lineNumBase, MS.Internal.Xml.Cache.XPathDocumentBuilder._linePosBase, MS.Internal.Xml.Cache.XPathDocumentBuilder._nameTable, MS.Internal.Xml.Cache.XPathDocumentBuilder._nodePageFact, MS.Internal.Xml.Cache.XPathDocumentBuilder._pageNmsp, MS.Internal.Xml.Cache.XPathDocumentBuilder._pageParent, MS.Internal.Xml.Cache.XPathDocumentBuilder._textBldr, System.Xml.XmlNameTable.Add(), System.Xml.Dictionary, MS.Internal.Xml.Cache.XPathDocumentBuilder.TextBlockBuilder.Initialize(), MS.Internal.Xml.Cache.XPathDocumentBuilder.NewNamespaceNode(), MS.Internal.Xml.Cache.XPathDocumentBuilder.NewNode(), MS.Internal.Xml.Cache.XPathDocumentBuilder.NodePageFactory.NextNodeIndex, MS.Internal.Xml.Cache.XPathDocumentBuilder.NodePageFactory.NextNodePage, System.Xml.XPath.XPathDocument.SetCollapsedTextNode(), System.Xml.XPath.XPathDocument.SetRootNode(), and System.Xml.XPath.XPathDocument.SetXmlNamespaceNode().

Referenced by MS.Internal.Xml.Cache.XPathDocumentBuilder.XPathDocumentBuilder().