internal static Node Create(IDOMNode Node)
 {
     if (Node is IDOMDocument)
     {
         return(Document.Create(Node as IDOMDocument));
     }
     else if (Node is IDOMAttr)
     {
         return(Attr.Create(Node as IDOMAttr));
     }
     else if (Node is IDOMCharacterData)
     {
         return(CharacterData.Create(Node as IDOMCharacterData));
     }
     else if (Node is IDOMElement)
     {
         return(Element.Create(Node as IDOMElement));
     }
     else if (Node is IDOMDocumentType)
     {
         return(DocumentType.Create(Node as IDOMDocumentType));
     }
     else if (Node is IDOMDocumentFragment)
     {
         return(DocumentFragment.Create(Node as IDOMDocumentFragment));
     }
     else if (Node is IDOMEntityReference)
     {
         return(EntityReference.Create(Node as IDOMEntityReference));
     }
     else if (Node is IDOMProcessingInstruction)
     {
         return(ProcessingInstruction.Create(Node as IDOMProcessingInstruction));
     }
     else
     {
         return(new Node(Node));
     }
 }
 /// <summary>
 /// Creates a processing instruction object with the specified target and data.
 /// </summary>
 /// <param name="Target">Target of the processing instruction.</param>
 /// <param name="Data">Data of the processing instruction.</param>
 /// <returns>The new processing instruction object.</returns>
 public ProcessingInstruction CreateProcessingInstruction(string Target, string Data)
 {
     return(ProcessingInstruction.Create(document.createProcessingInstruction(Target, Data)));
 }