Пример #1
0
        public void writePInstruction(xmlWriter writer, int nDeltaLevel)
        {
            writer.setIndentLevel(writer.getIndentLevel() + nDeltaLevel);

            string s = "";

            s = helperBuildIndent(writer.getIndentLevel());

            s += "<?";
            s += _strName;

            int i;
            int nCount = getAttribCount();

            for (i = 0; i < nCount; i++)
            {
                s += " ";                 // separator between attribute pairs
                s += _arrayAttribNames[i];
                s += "=\"";
                s += _arrayAttribValues[i];
                s += "\"";
            }

            s += "?>";
            s += "\r\n";             //	ENDL

            writer.writeString(s);
        }
Пример #2
0
        public void write(xmlWriter writer, int nDeltaLevel, bool bIndent, bool bEOL)           // for any kind	of open	tag
        {
            writer.setIndentLevel(writer.getIndentLevel() + nDeltaLevel);

            string s = "";

            if (bIndent)
            {
                s = helperBuildIndent(writer.getIndentLevel());
            }

            s += "<";
            s += _strName;
            int i;
            int nCount = getAttribCount();

            for (i = 0; i < nCount; i++)
            {
                s += " ";                 // separator between attribute pairs
                s += _arrayAttribNames[i];
                s += "=\"";
                s += _arrayAttribValues[i];
                s += "\"";
            }

            s += ">";
            if (bEOL)
            {
                s += "\r\n";         //	ENDL
            }
            writer.writeString(s);
        }
Пример #3
0
        public void writeClosingTag(xmlWriter writer, int nDeltaLevel, bool bIndent, bool bEOL)
        {
            string s = "";

            if (bIndent)
            {
                s = helperBuildIndent(writer.getIndentLevel());
            }

            s += "</";
            s += _strName;
            s += ">";
            if (bEOL)
            {
                s += "\r\n";         //	ENDL
            }
            writer.writeString(s);

            writer.setIndentLevel(writer.getIndentLevel() + nDeltaLevel);
        }