miku / xmlcutty Goto Github PK
View Code? Open in Web Editor NEWSelect elements from large XML files, fast.
License: GNU General Public License v3.0
Select elements from large XML files, fast.
License: GNU General Public License v3.0
How to get <data>value</data>
from the XML below?
<?xml version="1.0" encoding="UTF-8"?>
<root>
<a>A</a>
<b>
<![CDATA[<data>value</data>]]>
</b>
</root>
I noticed when I cut the xml for this xml, I can get back all of my CheatEntry
's but I'd like to output each record into a separate file denoted by its ID.
For instance here is my starting point
xmlcutty -path "/CheatTable/CheatEntries/CheatEntry" FIFA.CT
I'd like it to read this cheat entry and the others
<CheatEntry>
<ID>1621</ID>
<Description>...</Description>
<LastState Value="" RealAddress="..."/>
<GroupHeader>...</GroupHeader>
</CheatEntry>
And save 1621.xml
to a directory xmlcutty-output/
Is there a way to do this currently with xmlcutty somehow with bash pipes or can this be a feature request?
xmlcutty -path "/CheatTable/CheatEntries/CheatEntry" \
-output-dir xmlcutty-output \
-record-as-file "/CheatTable/CheatEntries/CheatEntry/ID" \
FIFA.CT
It would be nice to remove the formatting for each record so you can iterate over each record
xmlcutty -path /CheatTable/CheatEntries/CheatEntry FIFA.CT | \
while read record; do echo $record; done;
At the moment the above returns all the records in a pretty format making it difficult to parse individual records.
xmlcutty -unformatted -path /CheatTable/CheatEntries/CheatEntry FIFA.CT | \
while read record; do echo $record; done;
It seems that xpath predicates are not supported (or at least not streamed).
For exemple, /a[1]
do not quickly output the first <a>
.
It seems that attributes are not supported.
For instance, /a
do not match <a x=1>
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.