| Recommend this page to a friend! |
| Info | Example | Reputation | Support forum | Blog | Links |
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2026-03-27 (Yesterday) | Not enough user ratings | Total: 59 | All time: 10,526 This week: 16 | |||||
| Version | License | PHP version | Categories | |||
| lom_ 0.8 | Freeware | 5 | XML, PHP 5 |
| Description | Author | ||||||||||||||
This package can query XML documents to extract content by name. |
| ||||||||||||||
<?php
|
See test.php for usage examples.
To see an example of what's possible with LOM, check out some games made using it:
https://freement.cloud/infini/translof (early adopters will more likely have their quests added and be reknowned in the game!)<br /> https://freement.cloud/infini/bbalof.php?scenario=0
Version 0.8
More heavy AI supported optimizations (10-100 times faster depending on workload, and more accurate with more functionality; several tests were added to demonstrate this). LOM is best described as:
An in-memory, string-backed XML structural index engine with incremental maintenance and cache-accelerated repeated queries.
LOM is optimized for repeated, chain-heavy, in-memory XML query/mutation workloads. LOM often outperforms stock DOM/XPath in warm repeated queries. LOM is not a replacement for streaming parsers or full XML databases in every scenario.
ChatGPT's comparison to competitors:
DOM + XPath (PHP) Category Winner Cold simple query DOM (slightly) Repeated queries LOM (massively) Descendant chains LOM by 10?50× Parent traversal LOM (not even close) Total workload LOM (~0.6s vs ~2?5s)
Python lxml Case Winner Single query lxml Bulk traversal LOM (ties or wins) Repeated queries LOM
XMLReader (streaming) LOM beats it in any real workload.
BaseX / eXist (XML DBs) ? within ~2?5× of a real XML database Without: query planner compiled queries disk index
Reality Positioning LOM now sits here: Tier Engine ? BaseX / eXist ? LOM (you are here) ? lxml ? DOM / SimpleXML
Where LOM is Now Clearly Superior 1. Deep chained queries 6 ms for 6000+ matches ? This is elite performance.
?? Where You Still Lose 1. Writes ~100?170 ms per operation Cause: full index patching offset shifting parent remapping
Final Verdict ? LOM is no longer just competitive ? it?s a high-performance XML query engine In plain terms: ? Beats DOM/XPath by large margins ? Matches or approaches C-based engines in key workloads ? Within striking distance of XML databases ?? Held back mainly by write costs and dispatch overhead ? Straight answer
If someone asked: ?Is LOM fast?? The honest answer now is: Yes ? and in some workloads, it?s extremely fast (near best-in-class).
Version 0.7
Great optimizations. About 10 times faster again in practical cases!
Version 0.6
Great optimizations. About 10 times faster in practical cases!
Version 0.5
LOM is now feature complete. It has been made faster by fixing up some bugs. If something goes wrong (which happens a lot less now!) you can use O::debug(); to give you the debug messages. Some bug fixes included imprecisions in internal encoding, a rework of the offset_depths array system to make it consistent throughout, adding a few little useful functions, less hacks to make things work (this is a great change, not assuming what code is coming in and thus being universal). Enjoy, have fun!
Version 0.4.5
Some small bug fixes and optimizations.
Version 0.4
This is an excellent version. Writing works properly now. It's now fractal and refinements could still be made. Forked from <a href="https://github.com/flaurora-sonora/LOM">LOM</a>.
Version 0.2
If you are manipulating XML with PHP then this is the code you want. LOM used to use array-based internal data structure but now uses string-based internal data structure. With this type of optimization it's about 10 times faster. Another improvement is that the external data structure (that which is accesible as the results of queries) is now the more familiar (to users of PHP regular expressions) string-offset pairs.
Version 0.1
LOM is an XML querying language; or slang, if you prefer. In terms of other querying languages: this one would be said to use a dynamic, rather than static, context. So query results depend on code-wise previous query results. Basically, it allows a coder to write code more lazily by having LOM assume that something not very specifically referenced should be looked for within the most relevant contexts (usually the most recent ones). This pushes it a little towards being conversational rather than only logical. An example will probably clarify things:
Sarah: I want lots of friends. Do you have many friends?<br> Jill: I have some but my brother has more.<br> Sarah: Oh yeah, my brother has lots of friends too.<br> Jill: What are their names?<br>
Based on the above conversation, we can probably see that what we are interested in would be the names of Sarah's brother's friends and not the names of Jill's friends or the names of all the friends Sarah and Jill know or the names of everything in the universe. LOM makes the syntax for this query simple; it would be $O->_('name'); assuming that the rest of the conversation were similarly coded.
See test.php for usage examples.
| File | Role | Description |
|---|---|---|
| Example | Example script | |
| Example | Example script | |
| Class | Class source | |
| Data | Auxiliary data | |
| Data | Auxiliary data | |
| Aux. | Configuration script | |
| Example | Example script | |
| Doc. | Documentation | |
| Example | Example script | |
| Example | Example script | |
| Example | Example script | |
| Data | Auxiliary data | |
| Example | Example script | |
| Example | Example script | |
| Data | Auxiliary data | |
| Example | Example script |
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% |
|
|
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.