public object setAttributeNodeNS(DOMAttr attribute) { if (!IsAssociated) { DOMException.Throw(ExceptionCode.DomModificationNotAllowed); return(false); } attribute.Associate(XmlElement.OwnerDocument); if (XmlNode.OwnerDocument != attribute.XmlNode.OwnerDocument) { DOMException.Throw(ExceptionCode.WrongDocument); return(null); } XmlAttribute attr = XmlElement.Attributes[attribute.localName, attribute.namespaceURI]; if (attr != null) { XmlElement.Attributes.Remove(attr); XmlElement.Attributes.Append(attribute.XmlAttribute); return(new DOMAttr(attr)); } else { XmlElement.Attributes.Append(attribute.XmlAttribute); return(null); } }
protected override PHP.Core.Reflection.DObject CloneObjectInternal(PHP.Core.Reflection.DTypeDesc caller, ScriptContext context, bool deepCopyFields) { if (IsAssociated) { return(new DOMAttr(XmlAttribute)); } else { DOMAttr copy = new DOMAttr(); copy.__construct(this._name, this._value); return(copy); } }
public object removeAttributeNode(DOMAttr attribute) { if (!IsAssociated) { DOMException.Throw(ExceptionCode.DomModificationNotAllowed); return(false); } XmlAttribute attr = XmlElement.Attributes[attribute.nodeName]; if (attr == null) { DOMException.Throw(ExceptionCode.NotFound); return(false); } XmlElement.Attributes.Remove(attr); return(attribute); }
public void setIdAttributeNode(DOMAttr attribute, bool isId) { PhpException.Throw(PhpError.Warning, Resources.NotYetImplemented); }
public object removeAttributeNode(DOMAttr attribute) { if (!IsAssociated) { DOMException.Throw(ExceptionCode.DomModificationNotAllowed); return false; } XmlAttribute attr = XmlElement.Attributes[attribute.nodeName]; if (attr == null) { DOMException.Throw(ExceptionCode.NotFound); return false; } XmlElement.Attributes.Remove(attr); return attribute; }
public object setAttributeNodeNS(DOMAttr attribute) { if (!IsAssociated) { DOMException.Throw(ExceptionCode.DomModificationNotAllowed); return false; } attribute.Associate(XmlElement.OwnerDocument); if (XmlNode.OwnerDocument != attribute.XmlNode.OwnerDocument) { DOMException.Throw(ExceptionCode.WrongDocument); return null; } XmlAttribute attr = XmlElement.Attributes[attribute.localName, attribute.namespaceURI]; if (attr != null) { XmlElement.Attributes.Remove(attr); XmlElement.Attributes.Append(attribute.XmlAttribute); return new DOMAttr(attr); } else { XmlElement.Attributes.Append(attribute.XmlAttribute); return null; } }
protected override PHP.Core.Reflection.DObject CloneObjectInternal(PHP.Core.Reflection.DTypeDesc caller, ScriptContext context, bool deepCopyFields) { if (IsAssociated) return new DOMAttr(XmlAttribute); else { DOMAttr copy = new DOMAttr(); copy.__construct(this._name, this._value); return copy; } }