示例#1
0
 /// <summary>
 /// Get the data contents of this node. Will be unescaped and with original new lines, space etc.
 /// </summary>
 /// <returns>data</returns>
 public string GetWholeData()
 {
     return(Attributes.GetValue(DATA_KEY));
 }
示例#2
0
 /// <summary>
 /// Get the unencoded XML declaration.
 /// </summary>
 /// <returns>XML declaration</returns>
 public string GetWholeDeclaration()
 {
     return(Attributes.GetValue(DECL_KEY));
 }
示例#3
0
 /// <summary>
 /// Create a new DataNode.
 /// </summary>
 /// <param name="data">data contents</param>
 /// <param name="baseUri">base URI</param>
 public DataNode(string data, string baseUri)
     : base(baseUri)
 {
     Attributes.Add(DATA_KEY, data);
 }
示例#4
0
        private readonly bool _isProcessingInstruction; // <! if true, <? if false, declaration (and last data char should be ?)

        /// <summary>
        /// Create a new XML declaration
        /// </summary>
        /// <param name="data">data</param>
        /// <param name="baseUri">base uri</param>
        /// <param name="isProcessingInstruction">is processing instruction</param>
        public XmlDeclaration(string data, string baseUri, bool isProcessingInstruction)
            : base(baseUri)
        {
            Attributes.Add(DECL_KEY, data);
            this._isProcessingInstruction = isProcessingInstruction;
        }