Stream(System.Xml.XmlDocumentType dType) { m_dataObjs.Add(new Snoop.Data.ClassSeparator(typeof(System.Xml.XmlDocumentType))); m_dataObjs.Add(new Snoop.Data.String("Internal subset", dType.InternalSubset)); m_dataObjs.Add(new Snoop.Data.String("Public ID", dType.PublicId)); m_dataObjs.Add(new Snoop.Data.String("System ID", dType.SystemId)); }
Stream(System.Xml.XmlLinkedNode lnkNode) { m_dataObjs.Add(new Snoop.Data.ClassSeparator(typeof(System.Xml.XmlLinkedNode))); // No data to show at this level, but we want to explicitly // show that there is an intermediate class. System.Xml.XmlElement elem = lnkNode as System.Xml.XmlElement; if (elem != null) { Stream(elem); return; } System.Xml.XmlCharacterData charData = lnkNode as System.Xml.XmlCharacterData; if (charData != null) { Stream(charData); return; } System.Xml.XmlDeclaration decl = lnkNode as System.Xml.XmlDeclaration; if (decl != null) { Stream(decl); return; } System.Xml.XmlDocumentType dType = lnkNode as System.Xml.XmlDocumentType; if (dType != null) { Stream(dType); return; } System.Xml.XmlEntityReference entRef = lnkNode as System.Xml.XmlEntityReference; if (entRef != null) { Stream(entRef); return; } System.Xml.XmlProcessingInstruction pi = lnkNode as System.Xml.XmlProcessingInstruction; if (pi != null) { Stream(pi); return; } }
public static bool _CreateDocumentType_System_Configuration_ConfigXmlDocument_System_String_System_String_System_String_System_String( ) { //Parameters System.String name = null; System.String publicId = null; System.String systemId = null; System.String internalSubset = null; //ReturnType/Value System.Xml.XmlDocumentType returnVal_Real = null; System.Xml.XmlDocumentType returnVal_Intercepted = null; //Exception Exception exception_Real = null; Exception exception_Intercepted = null; InterceptionMaintenance.disableInterception( ); try { returnValue_Real = System.Configuration.ConfigXmlDocument.CreateDocumentType(name, publicId, systemId, internalSubset); } catch (Exception e) { exception_Real = e; } InterceptionMaintenance.enableInterception( ); try { returnValue_Intercepted = System.Configuration.ConfigXmlDocument.CreateDocumentType(name, publicId, systemId, internalSubset); } catch (Exception e) { exception_Intercepted = e; } Return((exception_Real.Messsage == exception_Intercepted.Message) && (returnValue_Real == returnValue_Intercepted)); }
public void CreateSvg(string version) { this.SvgDocument = new System.Xml.XmlDocument(); if (System.Environment.OSVersion.Platform != System.PlatformID.Unix) { this.SvgDocument.XmlResolver = null; // .NET Framework } //System.Xml.XmlDocumentType doctype = SvgDocument.CreateDocumentType("html", "-//W3C//DTD HTML 4.01//EN", "http://www.w3.org/TR/html4/strict.dtd", null); System.Xml.XmlDocumentType doctype = SvgDocument.CreateDocumentType("svg", "-//W3C//DTD SVG 1.1//EN", "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd", null); SvgDocument.AppendChild(doctype); this.SvgElement = SvgDocument.CreateElement("svg", SVGnamespace); this.SvgElement.SetAttribute("xmlns:dc", "http://purl.org/dc/elements/1.1/"); this.SvgElement.SetAttribute("xmlns:cc", "http://creativecommons.org/ns#"); this.SvgElement.SetAttribute("xmlns:rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); this.SvgElement.SetAttribute("xmlns:svg", SVGnamespace); // System.Xml.XmlAttribute attribute = svgDocument.CreateAttribute("version"); ; // attribute.Value = version; // this.SvgElement.Attributes.Append(attribute); this.SvgElement.SetAttribute("version", version); this.SvgElement.SetAttribute("width", "500"); this.SvgElement.SetAttribute("height", "500"); // http://tutorials.jenkov.com/svg/svg-viewport-view-box.html // svgElement.SetAttribute("viewBox", "0 0 500 500"); this.SvgElement.SetAttribute("viewBox", "0 0 " + this.SvgElement.Attributes["width"].Value + " " + this.SvgElement.Attributes["height"].Value); // preserveAspectRatio="none" this.RootNode = SvgDocument.AppendChild(this.SvgElement); }
internal XmlDocumentType(XmlDocument owner, SystemXmlDocumentType backingDocumentType) { _owner = owner; _backingDocumentType = backingDocumentType; }