Get a textual representation of a XML node (possibly keeping some predefined TAGS and ATTRIBUTES)
static
void
getNodeListContent
(DOMNodeList $nodeList, [string[] $tags_to_keep = null], [string[] $attributes_to_keep = null], [string[] $childs_to_skip = null])
-
DOMNodeList
$nodeList
-
string[]
$tags_to_keep: A list of tags to be kept (for other tags, only the text content will be kept)
-
string[]
$attributes_to_keep: A list of attributes to be kept (other attributes will be discarded)
-
string[]
$childs_to_skip: A list of tag names that will be totally skipped (no tag, no content)
Constructor
void
__construct
()
Load XML from a file
boolean
load
(string $file)
Load XML from a string
boolean
loadXML
(string $xml)
Parse the loaded NITF document
boolean
parseDocument
()
Dumps the internal XML tree back into a file
boolean
save
(string $filename)
-
string
$filename: File Path
Dumps the internal XML tree back into a string
string
saveXML
()
Basic output of the document
string
__toString
()