定制 brainite/quipxml 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

brainite/quipxml

最新稳定版本:v0.3.5

Composer 安装命令:

composer require brainite/quipxml

包简介

Enhanced SimpleXml-based toolkit

关键字:

README 文档

README

CI

QuipXml is chainable PHP objects for manipulating XML. Unlike other libraries that attempt to replicate jQuery syntax throughout, Quip attempts to provide lightweight extensions to SimpleXML to facilitate cleaner code without imposing JavaScript conventions on a PHP project. The end result is fast and easy to use.

Basic Usage

// The 'load' factory method aligns with SimpleXml constructor arguments.
$quip = Quip::load($xml_path, 0, TRUE);
$quip = Quip::load($xml_string);

// jQuery method names are used where appropriate.
$html = $quip->html();

// jQuery method names are adjusted when there is a keyword conflict.
$quip->xparent();
    
// While jQuery syntax is wonderful, you also get PHP advantages:
//  1. xpath
//  2. access children like properties
//  3. use foreach loops
$ul = $quip->xpath("//ul")->eq(0);
$ul->li->after('<li>New bullet.</li>');
foreach ($quip->xpath("//li")->eq(1) as $li) {
}

// For advanced operations, just like in jQuery, you can access the DOMNode for a given XML node.
$el = $ul->dom();

HHVM Limitations for SimpleXML

Effective 2014-03-24 (confirmed on travis-ci), you cannot use the magic self-reference on SimpleXml elements. This code will not work:

$sxml = simplexml_load_file('example.xml');
$sxml->original[0] = $expected;

Update: This was corrected on HHVM 3 (confirmed on travis-ci on 2014-05-30).

统计信息

  • 总下载量: 1.59k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固