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

◆ Value

override string System.Xml.XPath.XNodeNavigator.Value
get

Definition at line 142 of file XNodeNavigator.cs.

143 {
144 get
145 {
146 if (_source != null)
147 {
148 switch (_source.NodeType)
149 {
150 case XmlNodeType.Element:
151 return ((XElement)_source).Value;
152 case XmlNodeType.Attribute:
153 return ((XAttribute)_source).Value;
154 case XmlNodeType.Document:
155 {
156 XElement root = ((XDocument)_source).Root;
157 if (root == null)
158 {
159 return string.Empty;
160 }
161 return root.Value;
162 }
163 case XmlNodeType.Text:
164 case XmlNodeType.CDATA:
165 return CollectText((XText)_source);
166 case XmlNodeType.Comment:
167 return ((XComment)_source).Value;
168 case XmlNodeType.ProcessingInstruction:
169 return ((XProcessingInstruction)_source).Data;
170 default:
171 return string.Empty;
172 }
173 }
174 return string.Empty;
175 }
176 }
XmlNodeType NodeType
Definition XObject.cs:51
static string CollectText(XText n)