Example #1
0
        public override IXmlCursor SelectPropertyNode(IXmlNode node, bool mutable)
        {
            var flags =
                Serializer.Kind == XmlTypeKind.Simple ? CursorFlags.AllNodes : CursorFlags.Elements;

            return(node.SelectChildren(KnownTypes, Context, flags.MutableIf(mutable)));
        }
		public override IXmlCursor SelectPropertyNode(IXmlNode node, bool mutable)
		{
			var flags = Serializer.Kind == XmlTypeKind.Simple
				? CursorFlags.AllNodes
				: CursorFlags.Elements;
			return node.SelectChildren(KnownTypes, Context, flags.MutableIf(mutable));
		}
Example #3
0
 public IXmlCursor SelectChildren(
     IXmlKnownTypeMap knownTypes,
     IXmlNamespaceSource namespaces,
     CursorFlags flags
     )
 {
     return(node.SelectChildren(knownTypes, namespaces, flags));
 }
Example #4
0
 public override IXmlCursor SelectPropertyNode(IXmlNode node, bool mutable)
 {
     return(node.SelectChildren(
                KnownTypes,
                Context,
                CursorFlags.Elements.MutableIf(mutable)
                ));
 }
Example #5
0
 public override IXmlCursor SelectCollectionItems(IXmlNode node, bool mutable)
 {
     return(node.SelectChildren(
                KnownTypes,
                Context,
                CursorFlags.Elements.MutableIf(mutable) | CursorFlags.Multiple
                ));
 }
Example #6
0
        public IXmlCursor SelectBase(IXmlNode node)         // node is root
        {
            if (path != null)
            {
                return(node.Select(path, this, context, RootFlags));
            }

            return(node.SelectChildren(this, context, RootFlags));
        }
            protected IXmlCursor SelectChild(IXmlNode node, string name, Type type)
            {
                var knownTypes = new XmlKnownTypeSet(type);
                var knownType  = new XmlKnownType(name, null, null, null, type);

                knownTypes.Add(knownType, true);

                var cursor = node.SelectChildren(knownTypes, Namespaces, CursorFlags.Elements);

                Assert.True(cursor.MoveNext());

                return(cursor);
            }
		public override IXmlCursor SelectCollectionItems(IXmlNode node, bool mutable)
		{
			var flags = CursorFlags.Elements | CursorFlags.Multiple;
			return node.SelectChildren(KnownTypes, Context, flags.MutableIf(mutable));
		}
Example #9
0
 public override IXmlCursor SelectPropertyNode(IXmlNode node, bool mutable)
 {
     return(node.SelectChildren(this, Context, CursorFlags.Attributes.MutableIf(mutable)));
 }
			protected IXmlCursor SelectChild(IXmlNode node, string name, Type type)
			{
				var knownTypes = new XmlKnownTypeSet(type);
				var knownType  = new XmlKnownType(name, null, null, null, type);
				knownTypes.Add(knownType, true);

				var cursor = node.SelectChildren(knownTypes, Namespaces, CursorFlags.Elements);
				Assert.True(cursor.MoveNext());

				return cursor;
			}