How to work with XML - an overview of online services and xml editors. Collect data from XML files into Excel and export


Microsoft Excel – handy tool for organizing and structuring a wide variety of data. It allows you to process information using different methods and edit data sets.

Let's consider the possibilities of using it to generate and process web application files. Using a specific example, we will study the basics of working with XML in Excel.

How to create an XML file from Excel

XML is a file standard for transmitting data on the Web. Excel supports its export and import.

Let's look at creating an XML file using the example of a production calendar.

  1. Let's make a table from which you need to create an XML file in Excel and fill it with data.
  2. Let's create and insert an XML map with the required document structure.
  3. Export table data to XML format.

We save the file as XML.

Other ways to get XML data (schema):

  1. Download from a database, specialized business application. Schemes can be provided by commercial sites and services. Simple options are publicly available.
  2. Use ready-made samples to test XML maps. The samples contain the main elements and XML structure. Copy and paste into Notepad and save with the desired extension.


How to save an Excel file in XML format

One of the options:

  1. Click the Office button. Select “Save as” - “Other formats”.
  2. We assign a name. Select the save location and file type – XML.

More options:

  1. Download XLC to XML converter. Or find a service that allows you to export the file online.
  2. Download the add-on from the official Microsoft website XML Tools Add-in. It is freely available.
  3. Opening a new book. Office button – “Open”.

How to open an XML file in Excel

Click OK. You can work with the resulting table as with any Excel file.

How to Convert XML File to Excel

We edit the created table and save it in Excel format.

How to collect data from XML files in Excel

The principle of collecting information from multiple XML files is the same as the principle of transformation. When we import data into Excel, the XML map is transferred at the same time. Other data can be transferred to the same schema.

Each new file will be linked to an existing map. Each element in the table structure corresponds to an element in the map. Only one data binding is allowed.

To configure linking options, open the Map Properties tool from the Developer menu.


Possibilities:

  1. Each new file will be checked by Excel for compliance with the installed card (if we check the box next to this item).
  2. Data may be updated. Or new information will be added to the existing table (makes sense if you need to collect data from similar files).

This is all manual methods import and export of files.

XML for PHP Developers

Part 1. Working with XML in PHP in 15 minutes

PHP5 greatly simplifies working with XML in PHP

Content Series:

The importance of XML in the modern application development environment cannot be overstated. For those who have never worked with XML in PHP or have not yet migrated to PHP5, this quick tutorial will help you get started with the new XML-related functionality of PHP5 and appreciate how easy working with XML can be. This first of three articles introduces the API and demonstrates how SimpleXML, when combined with the DOM, serves the perfect tool for developers dealing with simple, predictable, and relatively compact XML documents. It is precisely these documents that, for example, Ajax applications operate when transmitting information about filling out a form; API responses from Web services such as weather.com are compiled into the same documents.

XML Basics

Brief introduction to XML basics will allow the reader to understand the importance of this language for the PHP developer and learn how to create simple XML documents.

About XML

Extensible Markup Language (XML) can be called both a markup language and a format for storing text data. It is a subset of the Standard Generalized Markup Language (SGML); it provides text tools to describe tree structures and their application to information. XML serves as the basis for a number of languages ​​and formats, such as Really Simple Syndication (RSS), Mozilla XML User Interface Language (XUL), Macromedia Maximum eXperience Markup Language (MXML), Microsoft eXtensible Application Markup Language (XAML) and open source language Java XML UI Markup Language (XAMJ).

XML structure

The basic unit of data in XML is the element. Elements are highlighted with a start tag such as , and an end tag such as. Each start tag must have a corresponding end tag. If any start tag is missing an end tag, the XML document is not formatted correctly and the parser will not be able to parse it properly. Tag names usually reflect the type of element. You might expect the book element to contain the title of the book, such as "The Great American Novel" (see Listing 1). The text contained between tags, including spaces, is called character data.

Listing 1. Example XML document
Great American Novel Cliff great guy Pretty Woman rare beauty A faithful dog likes to sleep Cliff meets a Pretty Woman. The Loyal Dog sleeps but wakes up to bark at the postman. 4 9

XML element and attribute names can consist of uppercase (A-Z) and lowercase (a-z) letters, numbers (0-9), some special and non-English characters, and three punctuation characters: hyphen, underscore, and period. Other characters are not allowed in names.

XML is case sensitive. In the given example And describe two different elements. Both names are acceptable. However, describing two different elements by names And cannot be considered a reasonable solution due to the high probability of typos.

Every XML document contains one and only one root element. The root element is the only element in an XML document that does not have a parent element. In the example above, the root element is . Most XML documents contain parent and child elements. Element has one child element . At the element four child elements: , <characters>, <plot>AND <success>. At the element <characters>three children, each of which is an element <character>. Each element <character>two child elements each, <name>And <desc>.</p><p>In addition to nested elements, which create a parent-child relationship, XML elements can have attributes. These are name-value pairs appended to the element's start tag. Names are separated from values ​​by an equal sign, =. Values ​​are enclosed in single or double quotes. There is 1 element in the listing <success>has two attributes: "bestseller" and "bookclubs". XML developers practice <a href="https://gtavrl.ru/en/kak-uznat-na-chto-spros-v-gorode-kak-vybirat-hodovoi-tovar-dlya-svoei-nishi-v/">different approaches</a> to the use of attributes. Most of the information contained in an attribute can be placed in a child element. Some developers insist that attribute information consist not of data but of metadata, that is, information about the data. The data itself must be contained in the elements. In reality, the decision about whether to use attributes depends on the nature of the data and how it is extracted from the XML.</p><h3>Advantages of XML</h3><p>One of the advantages of XML is its relative simplicity. An XML document can be compiled in a simple way <a href="https://gtavrl.ru/en/tekstovyi-redaktor-na-kompyuter-tekstovye-redaktory/">text editor</a> or word processor without resorting to special tools or software. Basic XML syntax consists of nested elements, some of which have attributes and content. Typically an element begins with an opening tag<тег>and ends with the appropriate closing tag</тег >. XML is case sensitive and does not ignore spaces or tabs. It is very similar to HTML, but unlike HTML, it allows tags to be named for <a href="https://gtavrl.ru/en/kitaiskie-smartfony-vysokogo-luchshii-brend-kitaiskih-smartfonov-obzor/">better description</a> your data. The advantages of XML include self-documentation, a human- and computer-readable format, and Unicode support, which allows you to create documents in <a href="https://gtavrl.ru/en/kogda-byl-sozdan-assembler-assembler-i-mashinnyi-yazyk-yazyk-programmirovaniya-assembler-yazyk-assemble/">different languages</a>, And <a href="https://gtavrl.ru/en/mozhno-li-zarabotat-na-instagramme-trebovaniya-k-uspehu-samye-prostye-sposoby/">simple requirements</a> to syntax and parsing. Unfortunately, UTF-8 support in PHP5 is fraught with problems; this is one of the shortcomings that led to the development of PHP6.</p><h3>Disadvantages of XML</h3><p>XML is verbose and redundant, resulting in large documents that take up a lot of space. <a href="https://gtavrl.ru/en/chto-delat-esli-aifon-ne-obnovlyaetsya-oshibka-zagruzki-obnovleniya-vozvrashchenie/">disk space</a> and network resources. It's supposed to be human readable, but it's hard to imagine a person trying to read an XML file with 7 million nodes. Protozoa <a href="https://gtavrl.ru/en/brauzer-ponyatie-vidy-naznachenie-tipy-sintaksicheskih-analizatorov-kakoi/">parsers</a> functionally unable to support a wide range of data types; for this reason, rare or unusual data, of which there are many, become a serious source of difficulty.</p><h3>Well-formed XML</h3><p>An XML document is considered to be well-formed if it follows the rules of XML syntax. An incorrectly constructed format is not, in a technical sense, an XML document. For example, an HTML tag like <br>, in XML is not acceptable; corresponding <a href="https://gtavrl.ru/en/samye-populyarnye-tegi-dlya-vk-pravilnyi-podbor-heshtegov-v/">correct tag</a> looks like <br />. The root element can be thought of as an endless filing cabinet. You only have one closet, but there are almost no restrictions on the type and quantity of its contents. Your closet can accommodate an endless number of drawers and file folders.</p><h2>PHP Basics</h2><p>Most readers of this article are already working with PHP, but may be unfamiliar with its history and evolution.</p><h3>About PHP</h3><p>Hypertext Preprocessor (PHP) is a platform-independent scripting language used to create dynamic Web pages and server applications. It started out as Personal Home Page/Form Interpreter (PHP/FI) and became <a href="https://gtavrl.ru/en/chto-zhe-vybrat-ili-vmesto-vyvoda-sozdaem-novuyu-zhizn-novoe/">new life</a> in the hands of Suraski and Gutmans, who released PHP3 in June 1998. Their company, Zend Technologies, still manages PHP development.</p><p>In July 2004, PHP5 was released with Zend Engine II and many new features such as:</p><ul><li>Object-oriented programming support</li><li>Improved MySQL support</li><li>Improved XML support</li> </ul><h3>PHP5 and XML</h3><p>XML support has been present in PHP since its inception. <a href="https://gtavrl.ru/en/sozdanie-dopolnitelnyh-okon-v-far-registraciya-bolee-rannei-versii-far-manager/">earlier versions</a>, but in PHP5 it has been significantly improved. XML support in PHP4 was limited, including only a default SAX-based parser, and DOM support was not W3C compliant. In PHP5, the PHP XML developers reinvented the wheel by ensuring compliance with generally accepted standards.</p><h3>New in XML support in PHP5</h3><p>PHP5 contains completely rewritten and new extensions, including the SAX parser, DOM, SimpleXML, XMLReader, XMLWriter and XSLT processor. Now all these extensions are based on libxml2.</p><p>Along with improved SAX support compared to PHP4, PHP5 implements DOM support in accordance with the W3C standard, as well as the SimpleXML extension. By default, both SAX, DOM, and SimpleXML are enabled. Those familiar with the DOM from other languages ​​will find it easier to implement similar functionality in PHP</p><h2>Reading, Processing and Writing XML in PHP5</h2><p>SimpleXML, optionally combined with the DOM, is the ideal choice for reading, processing, and composing simple, predictable, and relatively compact documents in PHP5.</p><h3>Brief overview of preferred APIs</h3><p>Of the many APIs present in PHP5, DOM is the most familiar, and SimpleXML is the easiest to program with. IN <a href="https://gtavrl.ru/en/golosovoi-pomoshchnik-alisa-shutit-mne-eti-anekdoty/">typical situations</a>, such as the ones we are looking at here, they are the most effective.</p><h3>DOM extension</h3><p>Document <a href="https://gtavrl.ru/en/chto-takoe-obektnaya-model-dokumenta-dom-vyrazitelnyi-javascript-document-object-model/">Object Model</a>(DOM) is the accepted W3C <a href="https://gtavrl.ru/en/virtualnyi-emulyator-android-luchshie-emulyatory-android-na-windows-andy---standartnyi/">standard set</a> objects for HTML and XML documents, a standard model for combining these objects, and a standard interface for accessing and manipulating them. Many vendors support the DOM as an interface to their custom data structures and APIs, making the DOM familiar to many developers. The DOM is easy to learn and use because its in-memory structure resembles the original XML document. To convey information to the application, the DOM creates a tree of objects that exactly replicates the tree of elements in the XML file, so that each XML element serves as a node in the tree. DOM is a parser based on a tree structure. Since the DOM builds a tree of the entire document, it consumes a lot of memory and CPU time. Therefore, parsing very large documents via the DOM is impractical due to performance issues. In the context of this article, the DOM extension is used primarily for its ability to import SimpleXML format and output XML in DOM format, or conversely, for use as string data or an XML file.</p><h3>SimpleXML</h3><p>The SimpleXML extension is the tool of choice for parsing XML. It requires PHP5 to work. It interacts with the DOM when composing XML files and has built-in XPath support. SimpleXML works best with simple record-type data, such as XML transmitted as a document or string from another part of the same application. Unless the XML document is too complex, too deep, or contains mixed content, SimpleXML is easier to code than DOM, as the name suggests. In addition, it is more reliable when working with a known document structure.</p><h3>Simple examples</h3><p>Below are simple examples of working with DOM and SimpleXML on compact XML files.</p><h2>DOM in action</h2><p>The DOM implemented in PHP5 is the same W3C DOM specification that you deal with in the browser and interact with through JavaScript. The same methods are used, so the coding methods will seem familiar to you. Listing 2 illustrates the use of the DOM to create an XML string and an XML document formatted for readability.</p><h5>Listing 2. Using the DOM</h5><span> <?php //Создает XML-строку и XML-документ при помощи DOM $dom = new DomDocument("1.0"); //добавление корня - <books>$books = $dom->appendChild($dom->createElement("books")); //adding an element <book>V <books>$book = $books->appendChild($dom->createElement("book")); // adding an element <title>V <book>$title = $book->appendChild($dom->createElement("title")); // adding a text node element <title>V <title>$title->appendChild($dom->createTextNode("Great American Novel")); //xml generation $dom->formatOutput = true; // setting the formatOutput attribute // domDocument to true // save XML as string or file $test1 = $dom->saveXML(); // passing a string to test1 $dom->save("test1.xml"); // saving the file?></span><p>This produces the output file shown in Listing 3.</p><h5>Listing 3. Output file</h5><span> <?xml version="1.0"?> <books> <book> <title>Great American Novel

Listing 4 imports a SimpleXMLElement object into a DOMElement object, illustrating how the DOM and SimpleXML interact.

Listing 4. Interop Part 1 - DOM imports SimpleXML
". "Great American Novel"); if ($sxe === false) ( echo "Error while parsing the document"; exit; ) $dom_sxe = dom_import_simplexml($sxe); if (!$dom_sxe) ( echo "Error while converting XML"; exit ; ) $dom = new DOMDocument("1.0"); $dom_sxe = $dom->importNode($dom_sxe, true); $dom_sxe = $dom->appendChild($dom_sxe); echo $dom->save("test2 .xml"); ?>

The function in Listing 5 takes a DOM document node and turns it into a SimpleXML node. This new object can then be used as a native SimpleXML element. In case of any error, FALSE is returned.

Listing 5. Interop Part 2 - SimpleXML Imports the DOM
loadXML(" Great American Novel"); if (!$dom) ( echo "Error while parsing the document"; exit; ) $s = simplexml_import_dom($dom); echo $s->book->title; // Great American Novel ?>

SimpleXML in Action

The SimpleXML extension is the tool of choice for parsing XML. It interacts with the DOM when composing XML files and has built-in XPath support. SimpleXML is easier to code than DOM, as its name suggests.

For those unfamiliar with PHP, Listing 6 formats the test XML file as an include file for readability purposes.

Listing 6. B following examples The test XML file is formatted as a PHP include file named example.php.
Great American Novel Cliff really great guy Lovely Woman matchless beauty Loyal Dog sleepy 4 9 XML; ?>

In a hypothetical Ajax application, for example, you might want to extract a zip code from an XML document and access a database. Listing 7 extracts the element from the XML file of the previous example

Listing 7. Retrieving a node - how easy is it to get it?
book->plot; // "Cliff meets Lovely Woman...." ?>

On the other hand, you may need to extract a multi-line address. When a single parent element has multiple instances of a child element, the normal iteration technique is used. This functionality is shown in Listing 8.

Listing 8. Retrieving multiple instances of an element
node, echo a separate . */ foreach ($xml->book as $book) ( echo $book->plot, "
"; } ?>

In addition to reading element names and their values, SimpleXML can also access element attributes. Listing 9 accesses the element's attributes; this is done in exactly the same way as accessing the elements of an array.

Listing 9. Demonstration of SimpleXML accessing element attributes
Great American Novel Cliff really great guy Lovely Woman matchless beauty Loyal Dog sleepy Cliff meets Lovely Woman. Loyal Dog sleeps, but wakes up to bark at mailman. 4 9 XML; ?>nodes of the first book. * Output the success indications, too. */ foreach ($xml->book->success as $success) ( switch((string) $success["type"]) ( // Get attributes as element indices case "bestseller": echo $success, " months on bestseller list"; break; case "bookclubs": echo $success, "bookclub listings"; break; ) ) ?>

To compare an element or attribute to a string, or to pass it to a function that requires a string, you must convert it to a string using the (string) operator. Otherwise, by default, PHP treats the element as an object (Listing 10).

Listing 10. Convert to a string or lose
book->title == "Great American Novel") { print "My favorite book."; } htmlentities((string) $xml->book->title); ?> !}

Data in SimpleXML does not have to be immutable. Listing 11 outputs a new XML document that is an exact copy of the original, except that the new one changes the name Cliff to Big Cliff.

Listing 11. Modifying a text node using SimpleXML
Great American Novel Cliff really great guy Lovely Woman matchless beauty Loyal Dog sleepy Cliff meets Lovely Woman. Loyal Dog sleeps, but wakes up to bark at mailman. 4 9 XML; ?>book->characters->character->name = "Big Cliff"; echo $xml->asXML(); ?>

Since PHP 5.1.3, SimpleXML has been enhanced with the ability to easily add child elements and attributes. Listing 12 outputs an XML document based on the original one, but with a new character and description added.

Listing 12. Adding child and text nodes using SimpleXML
Great American Novel Cliff really great guy Lovely Woman matchless beauty Loyal Dog sleepy Yellow Cat aloof Cliff meets Lovely Woman. Loyal Dog sleeps, but wakes up to bark at mailman. 4 9 XML; ?>book->characters->addChild("character"); $character->addChild("name", "Yellow Cat"); $character->addChild("desc", "aloof"); $success = $xml->book->addChild("success", "2"); $success->addAttribute("type", "reprints"); echo $xml->asXML(); ?>

Conclusion

This first article in a three-part series introduces the API and demonstrates that SimpleXML, when combined with the DOM when needed, is an ideal tool for developers dealing with simple, predictable, and relatively compact XML documents. Version PHP5 has significantly expanded the capabilities of programmers in terms of working with XML in PHP. In part two we will look at more complex methods XML parsing.

Goal of the work: gain practical skills in processing data presented in the Extensible Markup Language format ( XML).

Job objectives:

– study data description technology XML;

– study main library classes FCL, supporting the processing of data presented in the format XM L;

– complete a practical task on developing an application in C#.

Brief theoretical information

Format XML is a way of storing data in a simple text format, which means that the data can be read by almost any computer. This circumstance makes this format very suitable for use when transmitting data over the Internet and can even be read directly by a person.

XML is a markup language that can be used to describe arbitrary data. Based on this language it is possible to organize the storage of information and its exchange, independent of either specific applications or the platform on which they are executed.

XML- documentation. The completed data set is known in XML as XML-document. XML-a document can be a physical file on your computer, or it can be just a line in memory, but it must be complete and follow certain rules. XML-the document consists of several different parts, the most important of which are XML elements that contain the data that actually makes up the document.

Microsoft. NETFramework uses an object data model XML Document Object Model( DOM) to provide access to data in XML-documents, and additional classes for reading, writing and navigating within XML-document. These classes are supported by the namespace System.XML. An example of a description of a book catalog in the DOM is shown in Fig. 8.1.

The description of an XML document includes statements written in accordance with the requirements of its syntax. While creating XML-document, instead of using a limited set of specific elements, it is possible to create your own elements and assign them any names of the user’s choice. This is why XML is extensible. Consequently, this language can be used to describe almost any document: from a musical score to a database.

Catalog

Rice. 8.1. Hierarchical document structure

For example, a book catalog could be described as shown in Listing 8.1 (line numbers are not part of the document XML). For creating XML-document in the environment VisualStudio . NET you should use the command File\ NewFile and select the template name in the drop-down list of templates XMLFile.

Listing 8.1. Text XML-document

    C#2005 for professionals

    Christian Nagel

    1560

    800

    2006

    C# in tasks and examples

    Nikita Kultin

    240

    350

    2007

Line 1 of this listing contains an announcement XML, identifying the text as a document XML.Despite the optionality of the announcement XML, the document must include it to identify the version being used XML, since the document is without declaration XML may subsequently be treated as conforming to the latest version of XML, which may result in errors. Information parameter version indicates version XML, used in the document, parameter encoding– document encoding ( utf-8).

Line 2 contains a comment starting with the characters . Comments can be posted throughout XML-document.

IN XML- the document data is marked using tags(elements), which are names enclosed in angle brackets ( < > ). Tag names in XML-document (such as CATALOG, BOOK,TITLE,AUTHOR,PAGES,PRICE, PDATA in Listing 8.1) are not XML language definitions and are assigned when the document is created. For tags you can choose any correctly specified names, for example INVENTORY instead of CATALOG or ITEM instead of BOOK. Line 3 contains the root tag - CATALOG, which opens the markup of the entire document. When it finishes writing the root tag, the framework automatically inserts the end tag (line 18 of Listing 8.1), marking it with the symbols .

Note. Trying to create more than one root element in XML-document is an error.

The root element can contain an arbitrary number of nested elements. In Listing 8.1 XML-the document has a hierarchical structure in the form of a tree with elements nested within other elements and with one top-level element Document element, or Root element(in our example - CATALOG), which contains all other elements. Root element CATALOG includes descendant elements BOOK. In turn, the element BOOK consists of descendant elements TITLE, AUTHOR,PAGES,PRICE, PDATA.

Well-formed XML documents. The document is called correctly formed(well-formed) if it meets the following minimum set of rules for XML-documents:

XML-the document must have only one root element - element Document. All other elements must be nested within the root element;

– elements must be nested in an orderly manner. If an element begins inside another element, then it must end inside that element;

– Each element must have a start and end tag. Unlike HTML, XML does not allow the end tag to be omitted even if the browser is able to determine where the element ends;

– the element name in the start tag must exactly match (case sensitive) the name in the corresponding end tag;

– the element name must begin with a letter or an underscore ( _ ), followed by letters, numbers, and symbols: dot ( . ), dash ( - ) or underscore.

These are the basic rules for correct formation XML-document. Other concepts of the XML language (attributes, primitives, relationships) have their own rules that must be followed. We can say that if a document is created correctly and no errors occur when displaying or using it, then this is a correctly formed document. If you make a mistake in any tag HTML-page, then the browser will simply ignore the corresponding tag, and the error is in the tag XML-page will make it impossible to display it. If one of the errors is present, the analyzer built into Internet Explorer (sometimes called XML-processor, or parser) determines its position

FCL Library Classes for reading XML files. Working with XML-documents support the following library classes FCL: XmlTextReader, XmlDocument, XPathNavigator.

Class XmlTextReader is an abstract class that performs reading and provides fast delivery of uncached data. This approach is the least expensive in terms of server resources, but it forces data to be retrieved sequentially, from start to finish.

Class XmlDocument represents an implementation of the model DOM. This class holds data in memory after calling a method Load() to retrieve them from a file or stream, provides a tree view of the document in memory with navigation and editing capabilities, and also allows you to modify the data and save it back to the file.

Class XPathNavigator same as class XmlDocument, keeps in memory XML- entire document. It provides advanced data search capabilities, but does not provide the ability to make changes or save them.

Class XmlTextReader. Let's look at a simple example. Place elements on the form richTextBox And button(Fig. 8.2). When you click a button on an element richTextBox The file whose contents were presented in Listing 8.1 will be loaded. The code for the function called when the button is clicked is shown in Listing 8.2.

Rice. 8.2. Reading results from Xml-document

Listing 8.2. Button click handler code

//Cleaning the element richTextBox1

richTextBox1. Clear();

// Call a static method Create() returning a class object

// File book.xml is in the same location as the executable file

// programs

// Method Read() moves to the next node Xml-document

while (rdr.Read())

if(rdr.NodeType ==XmlNodeType.Text)

richTextBox1.AppendText(rdr.Value + "\r\n");

Class XmlReader can also read strongly typed data. There are several methods ReadElementContentAs, performing reading, among which ReadElementContentAsDecimal(),ReadElementContentAsInt() ,ReadElementContentAsBoolean() and etc.

Listing 8.3 shows how to read values ​​in decimal format and perform mathematical operations on them. In this case, the price of the element increases by 25%. The results of running this code are shown in Fig. 8.3.

Rice. 8.3. Reading results from Xml - document

only titles and prices of books

Listing 8.3. Reading data with strong type checking

// Cleaning the element richTextBox1

richTextBox1. Clear();

// Create a stream to read from a file book. xml

XmlReader rdr = XmlReader.Create("book.xml");

while (rdr.Read())

if (rdr.NodeType == XmlNodeType.Element)

// Checking the element name

if (rdr. Name == " PRICE")

// Method ReadElementContentAsDecimal() performs

// convert element content to type decimal

decimal price = rdr.ReadElementContentAsDecimal();

richTextBox1.AppendText("Currentprice= " + price +

"rub\r\ n");

// Price change by 25%

price += price * (decimal).25;

richTextBox1.AppendText("Newprice= " + price +

" rub\r\n\r\n");

else if (rdr.Name == "TITLE")

richTextBox1.AppendText(rdr.ReadElementContentAsString() + "\r\n");

Class XmlDocument. This class and its derived class XmlDataDocument used in the library .NET to represent the document object model DOM.

Unlike class XmlReader, Class XmlDocument offers not only reading but also writing capabilities, as well as random access to the tree DOM.

Let's look at an example in which an object of a class is created XmlDocument, the document is loaded from disk and a list window with book titles is displayed (Fig. 8.4).

Rice. 8.4. Display book titles in a list.

In the application form class, create a class object XmlDocument:

XmlDocument_doc = new XmlDocument();

The button click handler code is shown in Listing 8.4.

_doc.Load("book.xml");

// Get only those nodes that are needed

XmlNodeListnodeLst = _ doc. GetElementsByTagName(" TITLE");

// View in class loop XmlNodeList

foreach (XmlNodenodeinnodeLst)

listBox1. Items. Add(node. InnerText);

Let's introduce into the application the ability to display information about a book whose title is highlighted in the list, for which we'll add an event handler listBox1_ SelectedIndexChanged as shown in Listing 8.5.

Listing 8.5. List item click handler

private void listBox1_SelectedIndexChanged(object sender, EventArgs e)

// Create a search string

string srch = "KATALOG/BOOK";

// Search for additional data

XmlNode foundNode = _doc.SelectSingleNode(srch);

if (foundNode != null)

MessageBox.Show(foundNode.OuterXml);

MessageBox.Show("Not found");

The results of the application are shown in Fig. 8.5.

Rice. 8.5. Displaying information about the selected list item

Using a class XmlDocument You can also insert nodes into an existing document using the method Create- Element() .

For example, to create a new element BOOK you need to write the following code:

XmlElement newBook ​​= _doc.CreateElement("BOOK");

Create elements nested within an element BOOK, you can use the following code:

// Create a new element AUTOR

XmlElement newAuthor = _doc.CreateElement("AUTOR");

newAuthor.InnerText = "C.Baydachny";

The complete code of the button click handler is shown in Listing 8.6, the results of its operation are shown in Fig. 8.6.

Listing 8.6. Button click handler

privatevoidbutton1_ Click(objectsender, EventArgse)

_doc.Load("book.xml");

XmlElement newBook ​​= _doc.CreateElement("BOOK");

// Create a new element TITLE

XmlElement newTitle = _doc.CreateElement("TITLE");

newTitle.InnerText = ".NET Framework 2.0";

newBook.AppendChild(newTitle);

// Create a new element AUTOR

XmlElement newAuthor = _doc.CreateElement("AUTOR");

newAuthor.InnerText = "C.Baydachny";

newBook.AppendChild(newAuthor);

// Create a new element PAGES

XmlElement newpages = _doc.CreateElement("PAGES");

newpages.InnerText = "498";

newBook.AppendChild(newpages);

// Create a new element PRICE

XmlElement newprice = _doc.CreateElement("PRICE");

newprice.InnerText = "590";

newBook.AppendChild(newprice);

// Create a new element PDATA

XmlElement newpdata = _doc.CreateElement("PDATA");

newpdata.InnerText = "2006";

newBook.AppendChild(newpdata);

// Add to current document

_doc.DocumentElement.AppendChild(newBook);

// Write the document to disk

XmlTextWriter tr = new XmlTextWriter("bookEdit.xml", null);

tr.Formatting = Formatting.Indented;

_doc.WriteContentTo(tr);

tr. Close();

XmlNodeListnodeLst = _ doc. GetElementsByTagName(" TITLE");

// View in class loop XmlNodeList

foreach (XmlNodenodeinnodeLst)

listBox1. Items. Add(node. InnerText);

When using classes XmlDocument And XmlReader The following features must be taken into account. If you need random access to a document, you should use the class XmlDocument, and if you need a threading model, then classes based on the class XmlReader. Class XmlDocument is highly flexible, but its memory requirements are higher than those of the class XmlReader, and performance when reading a document is lower.

Rice. 8.6. Running application window

with added node

Class XPathNavigator. Class XPathNavigator is part of the namespace System. Xml. XPath, designed to increase performance. This space provides only reading of documents, therefore there are no editing tools in it, and classes are built to ensure fast execution on a given XML-document loops and selection operations in cursor style.

The best way to use classes from a namespace System. Xml. XPath is document viewing book. xml in a cycle.

Place elements on the form listBoxAndbutton. The button click handler code is shown in Listing 8.7, the results of executing this code are shown in Fig. 8.7.

Listing 8.7. Button click handler

privatevoidbutton1_ Click(objectsender, EventArgse)

// Create an object with the name doc class XPathDocument and transfer

// in its name constructor XML- file book.xml

XPathDocument doc = new XPathDocument("book.xml");

// Create an object with the name nav class XPathNavigator object based

// XPathDocument. An object nav can be used read-only

XPathNavigator nav = ((IXPathNavigable)doc). CreateNavigator();

// Create an object XPathNodeIterator for directory nodes

// and its child nodes

XPathNodeIterator iter = nav.Select("/KATALOG/BOOK");

while (iter.MoveNext())

// Method SelectDescendants() class XPathNavigator selects everything

// descendant nodes of the current node that meet the selection conditions

XPathNodeIterator newIter =

Data structuring is a useful thing, and will come in handy at the most unexpected moment. For example, if you structure your immediate future, you can see the size of your salary. And you can decide how efficiently you will work this entire month.

Of course, it’s science fiction, but a special language was invented for structuring programming ( xml). And to edit data presented in this format, specialized xml editors have been created:

What is XML

Many people know that the basis of any web resource is HTML. Using hypertext language, you can very easily and conveniently define the hierarchy of all elements on a web page. Partially, it allows us to solve the problem of styling. This entire hierarchy is created ( structured) using built-in tags and their attributes, the set of which, although not small, is still limited.

Therefore, HTML allows you to solve only one single problem of structuring on the Internet: arranging and creating elements of a web page for its subsequent markup ( design creation). But how to structure the rest of the data transferred in countless quantities between resources on the World Wide Web? How to organize their selection, search and filtering without restrictions?

All these "shortcomings" can be corrected using XML. Before starting our review of xml editors, let's take a closer look at what this language is and what its scope is in the virtual space:


The abbreviation XML translated from English means “ extensible markup language» ( Xtensible Markup Language). It is standardized and recommended for use by the W3C. This means that its use is the most optimal and “problem-free” way to create a web document.

In addition to describing documents, XML also partially affects the operation of special system programs. Preprocessors of this language are designed to translate data from machine code into a user-friendly form. Such preprocessors are the basis of all xml file editors.

The extensible markup language has the following positive aspects:

  • It is an ideal tool for describing the structure and markup of any web document;
  • In XML there is no limited set of elements with which structuring is carried out. Instead, the user himself sets the hierarchy and names of all elements, relying only on the rules of language description;
  • XML has a simple, understandable, and most importantly extensible syntax;
  • The language is built on the basic Unicode encodings;
  • It is widely used not only to describe ordinary web pages, but also easily connects to the code of most programming languages. Including those used in web programming ( PHP, ASP. NET and others ).

XML syntax

Every document written in XML consists of entities. An entity is the smallest unit (element). Each of the entities contains symbols.

They are divided into:

  • Markup symbols - tags, comments (< тег>, );
  • Literal characters - these are the main content contained between tags.

The logical structure of the language consists of hierarchically nested elements. The topmost one is called the root. Each element includes an opening and closing tag. And it should close in the root element in which it was opened:

Hello, world!

In addition to the root element, the XML document consists of a prologue. It is located at the very beginning of the code. The prologue may include:

  • Ads;
  • Processing instructions;
  • Comments.

The main components of XML are shown more clearly in the following screenshot of a document created in a simple xml editor:


You can learn more about the language syntax using the technical documentation for XML.

Overview of editors for XML

  • Microsoft Visual Studio is a powerful development environment that combines a large number of tools and tools for writing program code. It also includes a sophisticated XML editor. Among other things, it supports the creation and visualization of XML schemas. Unfortunately, PHP support in Visual Studio is weak. This environment is more “tailored” for creating web applications using ASP.NET:


  • Adobe Dreamweaver is another powerful development environment. Its entire toolkit is entirely aimed at creating websites. The syntax of several programming languages ​​is supported. Dreamweaver also includes a built-in xml table editor:


  • XMLSpy XML Editor is a powerful tool for working with various XML data formats. Not only simple editing of data, diagrams, syntax highlighting is supported, but also graphical visualization of hierarchical relationships between elements:


The visual xml editor is available in two editions costing 399 and 799 euros. The most expensive option includes syntax support for several programming languages ​​and a debugger. The cheaper option is fully compatible with the most popular development environments ( Visual Studio, Eclipse), and can act as their full-fledged add-on:


  • XML Notepad is a free xml editor. It has built-in syntax highlighting and a validation tool. As well as support for constructing circuits. The application has a simple and intuitive interface:


Review of online services

  • XML Schema Generator - a service that allows you to create a schema (XSD) from a regular XML document. The service interface is simple and designed in black and white. In addition, we are pleased with the complete absence of advertising;
  • xmlvalidation.com – this resource allows you to fully validate the content of an XML document copied into a special field or uploaded as a file:


  • XSL Transformation – serves to transform regular XML code using specified XSLT style templates. The service also includes several dozen more tools useful for webmasters, including an online XML validator.

As you can see from the review, to work with an extensible markup language, it is best to use a regular xml editor installed on your own computer or laptop. The set of tools of specialized online services is not so wide, and only allows you to check the XML document code for validity. Or convert its contents into a schema.

And XPointer. The widespread use of XML makes it necessary to know the tools for working with this technology and their functionality. XML processing includes formatting, parsing, editing, validation, and conversion to other formats. The vast majority of XML tools on the market provide a lot of functionality. This article explores different categories of XML tools and provides examples of relevant tools from various software vendors.

When choosing tools to work with XML technologies, you first need to determine the requirements. For example, if you plan to perform various tasks with XML (editing, validation, etc.), consider using an XML IDE with the appropriate features. For a specific task (comparing XML files or creating a sitemap), consider using a more specialized tool for that specific task.

This article covers the following categories of XML tools:

  • Programs for developing and checking XML sitemaps.
  • RSS feed generators.
  • XML schema generators.
  • Programs for checking the correctness of XML.
  • XML formatting programs.
  • XML editors.
  • Tools for working with XML.
  • Open source tools for working with XML.
  • XML Integrated Development Environments.
  • XML comparison tools
  • Tools for working with XQuery.
  • Tools for working with XPath.

Program for creating XML sitemaps

An XML sitemap is a list of all the URLs of a Web site. A sitemap informs a search engine of the Web site URLs that are available for crawling and inclusion in the search engine's database. Most sitemap programs are Web-based and ask for the URL of a Web site along with several parameters such as frequency of changes and date of last modification.

There are several sitemap generators:

  • Google SiteMap Generator automatically generates a sitemap based on updates and traffic to your Web site deployed to the Web server.
  • Gsite Crawler is a Windows application for creating sitemaps.

In addition to downloadable tools, sitemaps can be generated using various interactive applications; here are two examples:

  • Sitemaps Builder creates sitemaps for Google, HTML and text URLs.
  • XML Sitemaps creates sitemaps in XML, ROR, Text or HTML formats.

Programs for checking the correctness of XML sitemaps

Sitemap validation programs are used to validate maps generated for Web sites. Such a program checks whether the sitemap is suitable for use by a search engine.

Below is a list of sitemap checking programs:

  • Automapit sitemap validator checks the correctness of the sitemap, ensuring that it meets search engine criteria.
  • Sitemap XML validator checks your sitemap for correct XML code so you can correct errors before sending it to search engines.
  • XML sitemaps validator identifies any map issues so they can be resolved before submitting the map to search engines.
  • Online Merchant sitemap checker checks the correctness of XML headers in the sitemap.xml file.

RSS feed generators

RSS news feeds are a great way to keep your site visitors informed latest changes its contents. RSS feed generators are popular, for example, among users who want to view headlines from news sites (such as CNN) or know about the latest sports news.

Web site developers can generate RSS feeds using the following tools:

  • IceRocket RSS builder - program with simple interface, which allows you to add topics, links, and content to create RSS feeds for your Web site.
  • Feedity creates RSS feeds for Web pages, news, or products.
  • RSSPect sets up RSS feeds for Web sites, documents, or podcasts.

XML Schema Generators

XML schemas can be generated from an XML instance.

Available tools:

  • - a command line program that generates an XML Schema Definition (XSD) from XML.
  • XMLBeans is a program from the Apache project that provides several functions, including schema generation using inst2xsd (Instance to Schema Tool).
  • XML for ASP BuildXMLSchema - interactive XML schema generator.

Programs for checking the correctness of XML

XML code instances can be checked against their schemas.

Use one of the following interactive tools:

  • XMLValidation.com verifies that an XML document matches the XML Schema or DTD specified in the document, or, if there is no schema or DTD declaration, it checks the syntax.
  • DecisionSoft.com Schema Validator checks the validity of a single schema and document instance and displays a list of errors.
  • W3C XML validator - service for validating schemas with the namespace URI http://www.w3.org/2001/XMLSchema.

XML formatters

XML formatting is an operation often performed on XML data to make it easier to read. Most desktop applications that work with XML provide this functionality. For execution quick formatting XML content without installing any tools, try one of the following online services.

XML editors

XML editors help interpret an XML document by highlighting elements, attributes, or plain text and indentation. Another advantage using XML-editors is that they have content-oriented features, such as a tree view, which allows the user to easily navigate through the various nodes of an XML document. They also check the correctness of the code and display a list of warnings and errors if XML closing tags are missing.

  • Xerlin XML Editor is a Java™ program that creates and validates XML content. The editor is open source, supports XSLT, and can validate XML against DTDs and schemas.
  • - another open source XML editor in Java. Supports content export to PDF and HTML preview using XSLT; works on multiple platforms.
  • XMLFox is a free XML editor with a proofreader that allows you to create grammatically correct XML documents and schemas. This editor also supports other XML operations.

XML Tools

XSLT transformations are useful when transforming one XML form into another using style sheets. Numerous tools can help with this; examples include Tiger XSLT Mapper and Kernow.

  • Tiger XSLT Mapper is an XML structure mapping program that can be easily used by beginners. It automatically creates transformations that you can edit using a drag-and-drop graphical interface.
  • is a Java interface that performs transformations programmatically. Kernow is a good choice for developers who need to periodically perform XSLT transformations using a visual interface.

Several interactive XSLT programs are also useful:

Developers who prefer browser plugins can use the following useful XML plugins:

  • XSL Results Add-on displays the results of an XSLT transformation (XSLT 1.0 or XSLT 2.0 through Saxon-B) of a document.
  • XML Developer Toolbar adds to the toolbar standard tools for working with XML.
  • XML Tree displays XML data in a user-friendly way.
  • XML Viewer is an XML document viewing tool for Google Chrome.

Open source tools for working with XML

Users who cannot purchase commercial XML tools will benefit from open source tools. Active work community has allowed us to create a very good programs for working with XML.

Provides a number of functionality for processing XML documents:

  • DTD compliance check.
  • Automatic code completion using DTD.
  • Custom templates.
  • XSLT processing.
  • Editing in parts.

This is an XML editor that runs in Eclipse. Among its features:

  • Namespace support.
  • Automatic completion of tags and attributes.
  • XML Validation.

These tools also provide capabilities for working with Java elements:

  • Automatic completion of class names.
  • Opening a class definition.

It is an open source Java program with the following functionality:

  • Code formatting and completion.
  • XSL transformations.
  • Generating DTD and Schema.
  • XML Validation.

XML IDEs

XML integrated development environments (IDEs) handle almost all XML-related operations. There are a number of IDEs available with varying functionality.

XMLSpy is an XML IDE for creating, editing and debugging XML, XML Schemas, XSL/XSLT, XQuery, WSDL and SOAP. Additional features:

  • Code generator.
  • File converter.
  • Debugger.
  • Profiler.
  • Supports integration into Visual Studio.NET and Eclipse IDE.
  • Database Import Wizard, which allows you to import data from Microsoft® Access®.

XML Marker is an XML editor that uses a synchronized table-tree and text display to display XML data in tabular and hierarchical formats. This program can download very large documents (hundreds of megabytes and even several gigabytes in size). Other functionality:

  • Editor with syntax highlighting.
  • Sorting tables.
  • Automatic indentation.
  • Syntax checking as you type.

Liquid XML Studio is a package of several programs for working with XML. Provides the following tools:

  • XML Schema editor.
  • XML data binding code generator.
  • WSDL editor.
  • XML editor.
  • Integration with Microsoft Visual Studio.
  • Web services test client.
  • XPath Expression Composer.
  • HTML documentation generator.
  • XSLT editor and debugger.
  • Large file editor.
  • XML Diff - comparison of XML files.

Figure 1 shows the Liquid XML editor with a set of panels for working with XML content.

< oXygen />XML Editor is a full-featured XML IDE with support for a variety of XML-related operations. Its capabilities will be useful to experienced users. Let's list some of them:

  • Intelligent XML editor.
  • XML Validation.
  • XSL/XSLT support.
  • XQuery support.
  • XPath support.
  • XML publishing from a single source.
  • Support for Microsoft Office documents.

Figure 2 shows the editor< oXygen />XML Editor with source code and tree view of the XML document. (Enlarged version of Figure 2.)

Stylus Studio offers the following functionality:

  • XSLT and XQuery profilers.
  • EDI support.
  • Tools for working with corporate Web services.
  • XML pipeline.
  • Interaction of XML Schema with XSLT 2.0 and XQuery 1.0.
  • XML publishing tools.

Microsoft's XML Notepad helps developers create XML documents. This free program contains the XMLDiff tool which can be used to compare two XML files. Its interface is simple and easy to use. The program runs on the .Net platform. Here are some of its features:

  • Tree view synchronized with text view.
  • Namespace support when copying and moving text.
  • Incremental search in tree and text views.
  • Drag and drop editing support.
  • Unlimited number of operations to undo changes and redo changes when editing.
  • Support for searching using regular expressions and XPath.
  • Instant check for XML schema compliance.
  • Intellisense technology (autocompletion), based on expected elements, attributes and values ​​of enumerated simple types.
  • Support for specialized editors for data types date, dateTime, time and other types, for example, color.
  • Built-in HTML viewer.
  • XInclude support.

Figure 3 shows the Notepad XML editor with a tree view of the XML file and an error panel. (Enlarged version of Figure 3.)

It is a fast XML editor with validation support. The presence of tabs allows you to edit several files at the same time. Other functionality:

  • Checking for DTD/XML Schema/RELAX NG compliance.
  • XSLT and XPath support.
  • Formatted print output and color syntax highlighting.
  • Collapse and completion of tags.
  • Import and export Microsoft Word documents without losing information.
  • Support for XHTML, XSL, DocBook and Text Encoding Initiative (TEI).

XRay XML Editor is a free integrated XML IDE. This program checks the validity of the XML document as it is entered. Has built-in support for W3C standards. Also has an HTML viewer for previewing Web pages created using XML. You can create three types of schemas, including XSD, DTD, and External Data Representation (XDR). Other functionality includes:

  • Real-time XSLT processing.
  • Checking the correctness of the scheme in real time.
  • Integrated interactive training manual by XML.

XMLSpear is a free XML editor written in Java and available for many platforms. Features advanced functionality such as interactive schema checking, advanced XPath panel, and more. XML is displayed in three various formats, including tree view, item view, and source code view. XMLSpear is available as a Java Web program or as a standalone application. Additional functionality:

  • XPath and XSLT support.
  • Ability to generate complete XML documents from a schema.
  • Supports multiple encoding formats.
  • Integrated text and HTML plugin.
  • Check against schema or DTD in real time.
  • Generating schema from XML instances.
  • Tree editor for working with nodes.

XMLmind is a feature-rich XML editor that uses Java technology and available for multiple platforms. More suitable for experienced users rather than beginners. Introduces an innovative way to edit XML documents and requires the Java platform. XMLmind features include:

  • Convert XML documents to HTML, PDF, Eclipse and many other formats.
  • Availability of DITA converter.
  • Support for DocBook, JavaDoc, XHTML and built-in templates for them.
  • Support for creating MathML documents.
  • Editable commands.
  • Integrated XML parser and XSLT engine.

ElfData XML Editor is a program for Mac users OS. This XML environment The IDE has Unicode support and can perform grammatical checks on XML documents with and without a DTD. Two presentation modes are available: tree view and code view. Drag-and-drop technology support allows you to drag XML elements onto a document. The search is made easier by the presence of two modes: search by code and search by tree. Other functionality includes:

  • XML 1.0 compliant.
  • Macintosh style user interface.
  • Detailed error messages with assistance in debugging them.
  • The "Send to Browser" function allows you to view a document in a browser.
  • Ability to save pages as XHTML with DTD.

XMetaL is similar to word processor. Like most XML IDEs, it can perform validation of XML documents and supports schemas, DTDs, and XIncludes. Other functionality:

  • Spell checking and automatic code completion.
  • Support for output in Web help format.
  • Ability to convert XML documents to PDF, HTML and many other formats.
  • The XMetal connector integrates with content management systems (CMS) and version control systems such as SVN.
  • Unicode support allows you to create XML documents in various languages.
  • DITA support (with features such as visualization and topic-oriented user interface) to create DITA content.

XML comparison tools

Developers, editors, and authors often need a program to compare two versions of an XML document to track changes. Although there are numerous means of comparison, the most effective solution For many operations, there is a comparison program specifically designed for working with XML documents.

< oXygen />XML Diff & Merge can compare files, directories and ZIP archives. Once the source and target documents are loaded into the program, the differences are displayed in color; changes in the source and target files can be edited. The program has many built-in comparison algorithms and is capable of automatically selecting algorithms based on document content and size. The program can perform word-by-word and character-by-character comparisons. When comparing directories and archives, you can select the following parameters as the basis for comparison:

  • Timestamp.
  • Content.
  • Binary comparison.

Liquid XMLDiff has many XML-specific features, such as removing whitespace, comments, and processor directives. This program is powerful enough to predict whether items are new, deleted, or moved. The program is also available as part of Liquid XML Studio in a designer and developer edition.

ExamXML is powerful tool visual comparison and synchronization of differences between XML documents. The XML input for comparison can be either a file or a field from a database. ExamXML can also compare and store parts of an XML document; You can also import or export from Microsoft Excel® documents. ExamXML works on various Microsoft versions Windows®. Other functionality:

  • Checking the correctness of XML for compliance with the DTD and XML Schema.
  • Normalization of dates and numbers.
  • Drag-and-drop support.
  • XML documents are displayed as a tree.

DeltaXML allows you to search, compare, join, and synchronize changes in XML documents. Supports the Java API, making it easier to programmatically compare XML documents. Can work with large files. The program can produce a delta file with the comparison results. This file can be displayed directly or using XSL; you can process this file in other XMKL programs. DeltaXML Sync can compare three XML documents and visualize the differences. In addition to the XML document comparison function, it has several formatting tools:

  • DeltaXML DITA comparison.
  • Comparison of DeltaXML DocBook.
  • DeltaXML ODT comparison.
  • Merge DeltaXML ODT.

Tools for working with XQuery

The XQuery language can be very useful for advanced XML users to query and extract content from large XML documents. XQuery-specific programs can help you take advantage of XQuery and enable high-level features such as display, debugging, and profiling. These programs provide useful features such as correctness checking, code completion, and preview. Links to all of the tools listed are provided in the Resources section.

The XMLSpy XQuery Editor provides syntax highlighting and context-sensitive menus for XQuery. Its code completion features make it easy to create XQuery documents. It also allows you to develop XQuery for XML-aware databases. Other functionality:

  • Error isolation.
  • Simplified debugging.
  • Improved code performance.
  • Improved text viewing.

Stylus Studio XQuery Editor has an integrated XQuery editor with a wealth of functionality, including smart code review, code completion, element constructors, functions, path expressions, and more. The editor is based on open architecture XQuery with support for the Saxon XQuery processor. The XQuery source tree window supports drag-and-drop technology and convenient symbols and icons. Additional functionality:

  • Creating XQuery scripts.
  • XQuery Preview.
  • Mapping XQuery results to XQuery expressions.

The XQuery development tools for Eclipse help you create, debug, and run XQuery in the Eclipse environment. These tools also provide:

  • Support for XQuery updates and scripting enhancements.
  • Code completion and code patterns.
  • Semantics check and quick fixes.
  • Validation of input when entering.

XPath Tools

Specialized XPath tools are useful for visualizing the results of XPath evaluation and assist in creating and validating XPath expressions. TO useful functions The features provided by these tools include debugging XPath expressions, automatic code completion, and searching the database using XPath. Links to all of the tools listed are provided in the Resources section.

SketchPath is an XPath editor and XML parsing and testing tool. It provides an IDE for developing and testing XPath expressions against XML documents. The program uses the .NET Framework to work with XPath 1.0 and Saxon.NET for XPath 2.0. Other functionality:

  • Using XPath variables in expressions.
  • XPath Function Helper.
  • Built-in step tracer and debugger.
  • Syntax color highlighting for expressions.

XPath Visualizer is free Microsoft program Windows, which performs XPath queries on XML documents and visualizes the results. The input information can be a file in file system or URL; You can also copy the contents of the file directly into the program as text. You can enter full XPath queries in the program. Other functionality:

  • Automatic detection and mapping of XML namespaces.
  • Checking the correctness of XPath queries.
  • Automatically add a default XML namespace to a query expression and the ability to remove an XML namespace from any document.

Web programs for working with XPath are also available, for example:

  • XPath Query Expression Tool (XMLME.com).
  • XSLT Tryit Editor (W3Schools.com).






2024 gtavrl.ru.