承接 maxnz/xml-builder 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

maxnz/xml-builder

最新稳定版本:v1.0.1

Composer 安装命令:

composer require maxnz/xml-builder

包简介

Build XML easily and concisely

关键字:

README 文档

README

Build XML in PHP easily and concisely.

Usage

A Single XML element

$xml = new XMLElement(
    qualifiedName: "elementName",
    value: "element value",
);

print($xml->buildXML());
<elementName>element value</elementName>

Adding Attributes

$xml = new XMLElement(
    qualifiedName: "elementName",
    value: "element value",
    attributes: [
        "attribute1" => "attribute 1 value",
        "attribute2" => "attribute 2 value",
    ],
);

print($xml->buildXML());
<elementName attribute1="attribute 1 value" attribute2="attribute 2 value">element value</elementName>

Child Elements

$xml = new XMLElement(
    "elementName",
    "element value",
    [
        "attribute1" => "attribute 1 value",
        "attribute2" => "attribute 2 value",
    ],
    [
        new XMLElement(
            "child1",
            children: [
                new XMLElement(
                    "childOfChild",
                    "valueOfChild",
                )
            ]
        ),
        new XMLElement(
            "AnotherChild",
            "child2 Value",
        ),
    ],
);

print($xml->buildXML());
<elementName attribute1="attribute 1 value" attribute2="attribute 2 value">element value<child1><childOfChild>valueOfChild</childOfChild></child1><AnotherChild>child2 Value</AnotherChild></elementName>

统计信息

  • 总下载量: 138
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固