In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to get php dom elements, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
DOMDocument attribute:
List of attributes for Attributes storage nodes (read-only)
List of child nodes of childNodes storage nodes (read-only)
DataType returns the data type of this node
Definition of nodes given by Definition in DTD or XML mode (read-only)
Doctype specifies the document type node (read-only)
DocumentElement returns the root element of the document (readable and writable)
FirstChild returns the first child of the current node (read-only)
Implementation returns a XMLDOMImplementation object
LastChild returns the last child of the current node (read-only)
NextSibling returns the next sibling of the current node (read-only)
NodeName returns the name of the node (read-only)
NodeType returns the type of node (read-only)
NodeTypedValue storage node values (readable and writable)
NodeValue returns the text of the node (readable and writable)
OwnerDocument returns the root document containing this node (read-only)
ParentNode returns the parent node (read-only)
Parsed returns whether this node and its children have been resolved (read-only)
Prefix returns the namespace prefix (read-only)
PreserveWhiteSpace specifies whether to leave white space (readable and writable)
PreviousSibling returns the previous sibling of this node (read-only)
Text returns the text content of this node and its descendants (readable and writable)
Url returns the URL of the most recently loaded XML document (read-only)
Xml returns the XML representation of the node and its descendants (read-only)
DOMDocument method:
AppendChild adds a new child node to the current node, after the last child node
CloneNode returns a copy of the current node
CreateAttribute creates a new property
CreateCDATASection creates a CDATA segment that includes the given data
CreateComment creates a comment node
CreateDocumentFragment creates DocumentFragment object
CreateElement_x creates an element node
CreateEntityReference creates EntityReference object
CreateNode creates nodes of a given type, name, and namespace
CreatePorcessingInstruction create operation instruction node
CreateTextNode creates a text node that includes the given data
GetElementsByTagName returns a collection of elements with the specified name
HasChildNodes returns whether the current node has a child node
InsertBefore inserts a child node before the specified node
Load imports the XML document at the specified location
LoadXML imports the XML document of the specified string
RemoveChild removes the specified child node from the list of child nodes
ReplaceChild replaces the specified child node from the list of child nodes
Save saves the XML file to the specified node
SelectNodes matches the specified nodes and returns a list of matching nodes
SelectSingleNode matches the specified node and returns the first matching node
TransformNode uses the specified style sheet to transform nodes and their descendants
The above is all the content of the article "how php gets dom elements". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.