Altova StyleVision 2025 Enterprise Edition

The listing below shows how to iterate through open documents.

 

 

01 // Iterate through all open documents

02 for (Document doc:stylevision.getDocuments())

03   {

04      System.out.println("Document name : " + doc.getName() + "\n");

05      SchemaSources sources = doc.getSchemaSources();

06              

07      for (int i = 1; i <= sources.getCount(); i++)

08      {

09        SchemaSource source = sources.getItem(i);

10        System.out.println("\tSchema      file name : " + source.getSchemaFileName() + "\n");

11        System.out.println("\tWorking XML file name : " + source.getWorkingXMLFileName() + "\n");

12        System.out.println("\tIs main schema source : " + source.getIsMainSchemaSource() + "\tType name : " + source.getTypeName() + "\n");

13      }

14   }

 

© 2018-2024 Altova GmbH