Beispiel #1
0
            // On element, after attributes
            public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader)
            {
                if (reader.IsEmptyElement)
                {
                    r.PushState(PropertyNodeType.EndPropertyTree);
                    return(AnyState(r, reader));
                }

                return(AnyState(r, reader).Accept(r, reader));
            }
Beispiel #2
0
            public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader)
            {
                r.PushState(PropertyNodeType.PropertyTree);

                if (MoveToFirstAttribute(r, reader))
                {
                    return(Attribute);
                }

                else if (reader.IsEmptyElement)
                {
                    return(EndEmptyElement);
                }

                else
                {
                    return(EndStartElement);
                }
            }
Beispiel #3
0
            public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader)
            {
                r.PushState(PropertyNodeType.EndPropertyTree, PropertyNodeType.EndPropertyTree);

                if (r._elisionPosition > 0)
                {
                    r._elisionPosition--;
                    return(this);
                }

                if (MoveToNextAttribute(r, reader))
                {
                    return(PTXReaderState.Attribute);
                }
                else
                {
                    reader.MoveToElement();
                    return(PTXReaderState.EndStartElement);
                }
            }
Beispiel #4
0
            public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader)
            {
                if (r.PushState(PropertyNodeType.Property))
                {
                    r._elisionPosition++;
                    return(this);
                }
                if (r._elisionPosition > 0)
                {
                    // Don't repeat the property - but end all elided property trees
                    r._elisionPosition--;
                    return(PTXReaderState.EndAttributeElided);
                }

                if (MoveToNextAttribute(r, reader))
                {
                    return(this);
                }
                else
                {
                    reader.MoveToElement();
                    return(PTXReaderState.EndStartElement);
                }
            }
Beispiel #5
0
 public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader)
 {
     r.PushState(PropertyNodeType.EndPropertyTree);
     return(AnyState(r, reader));
 }
            // On element, after attributes
            public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader)
            {
                if (reader.IsEmptyElement) {
                    r.PushState(PropertyNodeType.EndPropertyTree);
                    return AnyState(r, reader);
                }

                return AnyState(r, reader).Accept(r, reader);
            }
 public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader)
 {
     r.PushState(PropertyNodeType.EndPropertyTree);
     return AnyState(r, reader);
 }
            public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader)
            {
                r.PushState(PropertyNodeType.PropertyTree);

                if (MoveToFirstAttribute(r, reader))
                    return Attribute;

                else if (reader.IsEmptyElement)
                    return EndEmptyElement;

                else
                    return EndStartElement;
            }
            public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader)
            {
                r.PushState(PropertyNodeType.Property);

                if (MoveToNextAttribute(r, reader)) {
                    return this;

                } else {
                    reader.MoveToElement();
                    return PTXReaderState.EndStartElement;
                }
            }