Git Product home page Git Product logo

wikipedia-xml-generator's Introduction

Wikipedia-XML-Generator

A simple app that takes some DTD which corresponds to a Wikipedia article contents and generates an XML with the article contents. If the given DTD doesn't follow the contents, an example skeleton XML will be generated.

How to run

  1. Make sure you have .NET Runtime installed on your machine.
  2. For Windows users you can use the provided batch script run.bat or simply open a terminal, go to the directory, containing the project file, and run dotnet run
  3. Open https://localhost:5001/ in your browser. Refresh if it hasn't loaded yet.

Example

DTD:

<!ELEMENT bulgaria (etymology, history)>
<!ELEMENT etymology (#PCDATA)>
<!ELEMENT history (first_bulgarian_empire)>
<!ATTLIST bulgaria someatt CDATA "wow">

Wikipedia link: https://en.wikipedia.org/wiki/Bulgaria

XML:

<?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?>
<BULGARIA SOMEATT="wow">Bulgaria ( (listen); Bulgarian: България, romanized: Bǎlgariya), officially the Republic of Bulgaria, is a country in Southeast Europe. It occupies the whole eastern part of the Balkans, and is bordered by Romania to the north, Serbia and North Macedonia to the west, Greece and Turkey to the south, and the Black Sea to the east. Bulgaria covers a territory of 110,994 square kilometres (42,855 sq mi), and is the sixteenth-largest country in Europe. Sofia is the nation's capital and largest city; other major cities are Plovdiv, Varna and Burgas.
    One of the earliest societies in the lands of modern-day Bulgaria was the Neolithic Karanovo culture, which dates back to 6,500 BC. In the 6th to 3rd century BC the region was a battleground for ancient Thracians, Persians, Celts and Ancient Macedonians; stability came when the Roman Empire conquered the region in AD 45. After the Roman state splintered, tribal invasions in the region resumed. Around the 6th century, these territories were settled by the early Slavs. The Bulgars leaded by Asparuh of Bulgaria attacked from the lands of (Old Great) Bulgaria and permanently invaded the Balkans in the late 7th century. They established (Danubian) Bulgaria, victoriously recognized by treaty in AD 681 by the Eastern Roman Empire. It dominated most of the Balkans and significantly influenced Slavic cultures by developing the Cyrillic script. The First Bulgarian Empire lasted until the early 11th century, when Byzantine emperor Basil II conquered and dismantled it. A successful Bulgarian revolt in 1185 established a Second Bulgarian Empire, which reached its apex under Ivan Asen II (1218–1241). After numerous exhausting wars and feudal strife, the empire disintegrated in 1396 and fell under Ottoman rule for nearly five centuries.
    The Russo-Turkish War of 1877–78 resulted in the formation of the third and current Bulgarian state. Many ethnic Bulgarians were left outside the new nation's borders, which stoked irredentist sentiments that led to several conflicts with its neighbours and alliances with Germany in both world wars. In 1946, Bulgaria came under the Soviet-led Eastern Bloc and became a socialist state. The ruling Communist Party gave up its monopoly on power after the revolutions of 1989 and allowed multiparty elections. Bulgaria then transitioned into a democracy and a market-based economy. Since adopting a democratic constitution in 1991, Bulgaria has been a unitary parliamentary republic composed of 28 provinces, with a high degree of political, administrative, and economic centralisation.
    Bulgaria is a developing country, with an upper-middle-income economy, ranking 56th in the Human Development Index. Its market economy is part of the European Single Market and is largely based on services, followed by industry—especially machine building and mining—and agriculture. Widespread corruption is a major socioeconomic issue; Bulgaria ranked as the most corrupt country in the European Union in 2018. The country also faces a demographic crisis, with its population shrinking annually since around 1990; it currently numbers roughly seven million, down from a peak of nearly nine million in 1988. Bulgaria is a member of the European Union, NATO, and the Council of Europe; it is also a founding member of the OSCE, and has taken a seat on the United Nations Security Council three times.<ETYMOLOGY>The name Bulgaria is derived from the Bulgars, a tribe of Turkic origin that founded the First Bulgarian Empire. Their name is not completely understood and is difficult to trace back earlier than the 4th century AD, but it is possibly derived from the Proto-Turkic word bulģha ("to mix", "shake", "stir") and its derivative bulgak ("revolt", "disorder"). The meaning may be further extended to "rebel", "incite" or "produce a state of disorder", and so, in the derivative, the "disturbers". Tribal groups in Inner Asia with phonologically close names were frequently described in similar terms, as the Buluoji, a component of the "Five Barbarian" groups, which during the 4th century were portrayed as both: a "mixed race" and "troublemakers".</ETYMOLOGY>
    <HISTORY>
        <FIRST_BULGARIAN_EMPIRE>Not long after the Slavic incursion, Moesia was once again invaded, this time by the Bulgars under Khan Asparukh. Their horde was a remnant of Old Great Bulgaria, an extinct tribal confederacy situated north of the Black Sea in what is now Ukraine and southern Russia. Asparukh attacked Byzantine territories in Moesia and conquered the Slavic tribes there in 680. A peace treaty with the Byzantine Empire was signed in 681, marking the foundation of the First Bulgarian Empire. The minority Bulgars formed a close-knit ruling caste.Succeeding rulers strengthened the Bulgarian state throughout the 8th and 9th centuries. Krum introduced a written code of law and checked a major Byzantine incursion at the Battle of Pliska, in which Byzantine emperor Nicephorus I was killed. Boris I abolished paganism in favour of Eastern Orthodox Christianity in 864. The conversion was followed by a Byzantine recognition of the Bulgarian church and the adoption of the Cyrillic alphabet, developed in the capital, Preslav. The common language, religion and script strengthened central authority and gradually fused the Slavs and Bulgars into a unified people speaking a single Slavic language. A golden age began during the 34-year rule of Simeon the Great, who oversaw the largest territorial expansion of the state.After Simeon's death, Bulgaria was weakened by wars with Magyars and Pechenegs and the spread of the Bogomil heresy. Preslav was seized by the Byzantine army in 971 after consecutive Rus' and Byzantine invasions. The empire briefly recovered from the attacks under Samuil, but this ended when Byzantine emperor Basil II defeated the Bulgarian army at Klyuch in 1014. Samuil died shortly after the battle, and by 1018 the Byzantines had conquered the First Bulgarian Empire. After the conquest, Basil II prevented revolts by retaining the rule of local nobility, integrating them in Byzantine bureaucracy and aristocracy, and relieving their lands of the obligation to pay taxes in gold, allowing tax in kind instead. The Bulgarian Patriarchate was reduced to an archbishopric, but retained its autocephalous status and its dioceses.</FIRST_BULGARIAN_EMPIRE>
    </HISTORY>
</BULGARIA>

wikipedia-xml-generator's People

Contributors

pavelsarlov avatar miroslavdionisiev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.