SimpleXML SimpleXMLElement 클래스

(PHP 5, PHP 7, PHP 8)


소개

XML 문서의 요소를 나타냅니다.


클래스 개요

                  
class SimpleXMLElement implements Stringable, Countable, RecursiveIterator {

  /* Methods */
  public __construct(
      string $data,
      int $options = 0,
      bool $dataIsURL = false,
      string $namespaceOrPrefix = "",
      bool $isPrefix = false
  )
  public addAttribute(string $qualifiedName, string $value, ?string $namespace = null): void
  public addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null): ?SimpleXMLElement
  public asXML(?string $filename = null): string|bool
  public attributes(?string $namespaceOrPrefix = null, bool $isPrefix = false): ?SimpleXMLElement
  public children(?string $namespaceOrPrefix = null, bool $isPrefix = false): ?SimpleXMLElement
  public count(): int
  public getDocNamespaces(bool $recursive = false, bool $fromRoot = true): array|false
  public getName(): string
  public getNamespaces(bool $recursive = false): array
  public registerXPathNamespace(string $prefix, string $namespace): bool
  public __toString(): string
  public xpath(string $expression): array|null|false
}
                  
                

변경 로그

버전 설명
8.0.0 SimpleXMLElement는 이제 Stringable, CountableRecursiveIterator를 구현합니다.

목차