V
V
Vitaliy2021-05-24 12:30:39
Python
Vitaliy, 2021-05-24 12:30:39

How to parse scrapbook.rdf file from pale moon scrapbook extension using python?

There is a file, here's a part:

<?xml version="1.0"?>
<RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#"
         xmlns:NC="http://home.netscape.com/NC-rdf#"
         xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <RDF:Description RDF:about="urn:scrapbook:item20200711150730"
                   NS1:id="20200711150730"
                   NS1:create="20200711150730"
                   NS1:title="Делаем из Vim-а конфетку / Хабр"
                   NS1:chars="UTF-8"
                   NS1:source="https://habr.com/ru/post/468265/"
                   NS1:comment=""
                   NS1:lock=""
                   NS1:type=""
                   NS1:icon="resource://scrapbook/data/20200711150730/favicon-16x16.png"
                   NS1:modify="20200711150804" />
  <RDF:Seq RDF:about="urn:scrapbook:item20200704081851">
    <RDF:li RDF:resource="urn:scrapbook:item20200704081900"/>
    <RDF:li RDF:resource="urn:scrapbook:item20200711150730"/>
  </RDF:Seq>


How to access values ​​like NS1:id

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaliy, 2021-05-25
@Vitaliy_dzen

Once again, I forgot to wrap it in code tags:
<dc:title xml:lang="en">Anna's Homepage</dc:title>
i.e. <dc:title какой-то текст</dc:title>
, but I haveNS1:х=" какой-то текст"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question