public void SetPrefixesFromReader(GXXMLReader rdr)
 {
     for (int i = 1; i <= rdr.AttributeCount; i++)
     {
         string attName = rdr.GetAttributeName(i);
         if (attName.ToLower().StartsWith("xmlns:"))
         {
             AddNamespacePrefix(attName.Substring(6), rdr.GetAttributeByIndex(i));
         }
         else if (attName.ToLower() == "xmlns")
         {
             AddNamespacePrefix("", rdr.GetAttributeByIndex(i));
         }
     }
 }
Esempio n. 2
0
 void setNamespaceContext(GXXMLReader rdr, bool setLocalNamespace)
 {
     for (int i = 1; i <= rdr.AttributeCount; i++)
     {
         string attName = rdr.GetAttributeName(i);
         if (attName.ToLower().StartsWith("xmlns:"))
         {
             AddNamespacePrefix(attName.Substring(6), rdr.GetAttributeByIndex(i));
         }
         else if (attName.ToLower() == "xmlns" && setLocalNamespace)
         {
             AddNamespacePrefix("", rdr.GetAttributeByIndex(i));
         }
     }
 }
Esempio n. 3
0
        public override short readxml(GXXMLReader oReader,
                                      String sName)
        {
            short  currError;
            String arrayType;
            short  gxi;

            currError = 1;
            arrayType = "";
            gxi       = 0;
            while (gxi <= oReader.AttributeCount)
            {
                if (StringUtil.StrCmp(oReader.GetAttributeLocalName(gxi), "arrayType") == 0)
                {
                    arrayType = oReader.GetAttributeByIndex(gxi);
                }
                gxi = (short)(gxi + 1);
            }
            if (StringUtil.StrCmp(arrayType, "") != 0)
            {
                currError = (short)(readEncodedArray(arrayType, oReader));
            }
            else
            {
                currError = (short)(readxmlcollection(oReader, sName, ""));
            }
            return(currError);
        }