mirror of
https://github.com/AdaCore/xmlada.git
synced 2026-02-12 12:30:28 -08:00
For the purpose of sanity checking xmlada on VxWorks (and possibly other cross platforms), add cross-comilable examples, one per dom, sax and schema, that have all xml/xsd sources embedded in the test's main. Add new cross- and existing examples to the installation of xmlada. Change-Id: I56848955171a3b1f16f38bc3ecd7cef253af6346
27 lines
598 B
Ada
27 lines
598 B
Ada
--
|
|
-- Copyright (C) 2017, AdaCore
|
|
--
|
|
|
|
with Input_Sources.File; use Input_Sources.File;
|
|
with Sax.Readers; use Sax.Readers;
|
|
with DOM.Core; use DOM.Core;
|
|
with Schema.Dom_Readers; use Schema.Dom_Readers;
|
|
|
|
procedure DomSchemaExample is
|
|
Input : File_Input;
|
|
Reader : Schema.Dom_Readers.Tree_Reader;
|
|
Doc : Document;
|
|
begin
|
|
Set_Public_Id (Input, "Preferences file");
|
|
Open ("pref_with_xsd.xml", Input);
|
|
|
|
Set_Feature (Reader, Validation_Feature, False);
|
|
|
|
Parse (Reader, Input);
|
|
Close (Input);
|
|
|
|
Doc := Get_Tree (Reader);
|
|
|
|
Free (Reader);
|
|
end DomSchemaExample;
|