Files
xmlada/docs/dom/domschemaexample.adb
Emmanuel Briot 642d95a2a2 Add new example, pointing to a real XSD file
Change-Id: Ifcd250792015aa00f76b3b175063c6350e0ecbf5
2015-10-13 15:26:40 +02:00

24 lines
611 B
Ada

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);
Set_Feature (Reader, Namespace_Feature, False);
Parse (Reader, Input);
Close (Input);
Doc := Get_Tree (Reader);
Free (Reader);
end DomSchemaExample;