Ymlparser
YML (Yandex Market Language) parser
Install / Use
/learn @lireincore/YmlparserREADME
YML (Yandex Market Language) parser
About
YML (Yandex Market Language) streaming parser with validation. Based on XMLReader. Suitable for large files.
Install
Add the "lireincore/ymlparser": "^3.2" package to your require section in the composer.json file
or
$ php composer.phar require lireincore/ymlparser
Usage
use LireinCore\YMLParser\YML;
$yml = new YML();
try {
$yml->parse($filepath);
$date = $yml->getDate();
$shop = $yml->getShop();
if ($shop->isValid()) {
$offersCount = $shop->getOffersCount();
$shopData = $shop->getData();
//...
foreach ($yml->getOffers() as $offer) {
if ($offer->isValid()) {
$offerCategoryHierarchy = $shop->getCategoryHierarchy($offer->getCategoryId());
$offerData = $offer->getData();
//...
} else {
var_dump($offer->getErrors());
//...
}
}
} else {
var_dump($shop->getErrors());
//...
}
} catch (\Exception $e) {
echo $e->getMessage();
//...
}
License
The MIT License (MIT). Please see License File for more information.
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
