Example #1
0
        public XmlNode addNodeToNode(XmlNode nodeFather, cXmlProperty xProperty)
        {
            XmlNode node = m_domDoc.CreateNode(XmlNodeType.Element, xProperty.getName(), "");

            nodeFather.AppendChild(node);
            return(node);
        }
Example #2
0
        public cXmlProperty getNodeValue(XmlNode node)
        {
            cXmlProperty o = null;

            o = new cXmlProperty();
            o.setValue(eTypes.eText, node.Name);
            return(o);
        }
Example #3
0
        public bool addBinaryPropertyToNode(XmlNode node, cXmlProperty xProperty)
        {
            XmlAttribute attr = m_domDoc.CreateAttribute(xProperty.getName());

            attr.Value = Convert.ToBase64String(xProperty.getBinaryValue());
            node.Attributes.Append(attr);
            return(true);
        }
Example #4
0
        public bool addPropertyToNode(XmlNode node, cXmlProperty xProperty)
        {
            XmlAttribute attr = m_domDoc.CreateAttribute(xProperty.getName());

            attr.Value = xProperty.getValueString(eTypes.eVariant);
            node.Attributes.Append(attr);
            return(true);
        }
Example #5
0
        public cXmlProperty getNodeProperty(XmlNode node, string propertyName)
        {
            cXmlProperty o   = new cXmlProperty();
            string       txt = "";

            if (node.Attributes[propertyName] != null)
            {
                txt = node.Attributes[propertyName].Value;
            }

            // TODO: remove after testing
            //txt = txt.Replace("\n", "\\n");
            o.setValue(eTypes.eVariant, txt);
            return(o);
        }
Example #6
0
        public cXmlProperty getBinaryNodeProperty(XmlNode node, string propertyName)
        {
            XmlAttribute attr = null;
            cXmlProperty o    = new cXmlProperty();

            byte[] vBuffer = null;

            XmlElement element = (XmlElement)node;

            attr = element.GetAttributeNode(propertyName);
            if (attr != null)
            {
                vBuffer = System.Convert.FromBase64String(attr.Value);
            }
            else
            {
                G.redim(ref vBuffer, 0);
            }

            o.setBinaryValue(vBuffer);
            return(o);
        }
Example #7
0
 public XmlNode addNodeToNodeByTag(string nodeTag, cXmlProperty xProperty)
 {
     XmlNodeList w_element = m_domDoc.GetElementsByTagName(nodeTag);
     return addNodeToNode(w_element[0], xProperty);
 }
Example #8
0
 public XmlNode addNode(cXmlProperty xProperty)
 {
     return addNodeToNodeByTag("Root", xProperty);
 }
Example #9
0
 public bool addBinaryPropertyToNode(XmlNode node, cXmlProperty xProperty)
 {
     XmlAttribute attr = m_domDoc.CreateAttribute(xProperty.getName());
     attr.Value = Convert.ToBase64String(xProperty.getBinaryValue());
     node.Attributes.Append(attr);
     return true;
 }
Example #10
0
 public bool addPropertyToNode(XmlNode node, cXmlProperty xProperty)
 {
     XmlAttribute attr = m_domDoc.CreateAttribute(xProperty.getName());
     attr.Value = xProperty.getValueString(eTypes.eVariant);
     node.Attributes.Append(attr);
     return true;
 }
Example #11
0
 public bool addPropertyToNodeByTag(string nodeTag, cXmlProperty xProperty)
 {
     XmlNodeList w_element = m_domDoc.GetElementsByTagName(nodeTag);
     return addPropertyToNode(w_element.Item(0), xProperty);
 }
Example #12
0
        public bool addPropertyToNodeByTag(string nodeTag, cXmlProperty xProperty)
        {
            XmlNodeList w_element = m_domDoc.GetElementsByTagName(nodeTag);

            return(addPropertyToNode(w_element.Item(0), xProperty));
        }
Example #13
0
        public cXmlProperty getNodeProperty(XmlNode node, string propertyName)
        {
            cXmlProperty o = new cXmlProperty();
            string txt = "";

            if (node.Attributes[propertyName] != null)
            {
                txt = node.Attributes[propertyName].Value;
            }

            // TODO: remove after testing
            //txt = txt.Replace("\n", "\\n");
            o.setValue(eTypes.eVariant, txt);
            return o;
        }
Example #14
0
        public XmlNode addNodeToNodeByTag(string nodeTag, cXmlProperty xProperty)
        {
            XmlNodeList w_element = m_domDoc.GetElementsByTagName(nodeTag);

            return(addNodeToNode(w_element[0], xProperty));
        }
Example #15
0
 public XmlNode addNode(cXmlProperty xProperty)
 {
     return(addNodeToNodeByTag("Root", xProperty));
 }
Example #16
0
 public XmlNode addNodeToNode(XmlNode nodeFather, cXmlProperty xProperty)
 {
     XmlNode node = m_domDoc.CreateNode(XmlNodeType.Element, xProperty.getName(), "");
     nodeFather.AppendChild(node);
     return node;
 }
Example #17
0
 public cXmlProperty getNodeValue(XmlNode node)
 {
     cXmlProperty o = null;
     o = new cXmlProperty();
     o.setValue(eTypes.eText, node.Name);
     return o;
 }
Example #18
0
 public bool addProperty(cXmlProperty xProperty)
 { 
     return addPropertyToNodeByTag("Root", xProperty);
 }
Example #19
0
        public cXmlProperty getBinaryNodeProperty(XmlNode node, string propertyName)
        {
            XmlAttribute attr = null;
            cXmlProperty o = new cXmlProperty();
            byte[] vBuffer = null;

            XmlElement element = (XmlElement)node;
            attr = element.GetAttributeNode(propertyName);
            if (attr != null)
            {
                vBuffer = System.Convert.FromBase64String(attr.Value);
            }
            else
            {
                G.redim(ref vBuffer, 0);
            }

            o.setBinaryValue(vBuffer);
            return o;
        }
Example #20
0
 public bool addProperty(cXmlProperty xProperty)
 {
     return(addPropertyToNodeByTag("Root", xProperty));
 }