Skip to content

felixgirault/nokogiri

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nokogiri

Cuts through XML like a breeze.

Examples

Given this XML:

<p>
	<span>Lorem ipsum dolor <em>sit amet</em>.</span>
</p>

Cutting it at the twentieth character...

$Nokogiri = new Nokogiri\Nokogiri();
$Nokogiri->cut($xml, 20);

Would return:

<p>
	<span>Lorem ipsum dolor <em>sit</em></span>
</p>

Cutting it at the eleventh character...

$Nokogiri->cut($xml, 11);

Would return:

<p>
	<span>Lorem ipsum</span>
</p>

Note that the blank characters between tags are not taken into account.

Contributing

Installation

Clone the project and run composer install.

Running tests

Run tests with composer run-script test.

Notes

The implementation is probably shitty, as I don't know anything about writing a decent parser...

Also, the implementation of the parser itself is kind of tied to the class using it. It is obviously bad but it works 😁

About

Cuts through XML like a breeze.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy