Altova StyleVision 2023 Professional 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() + "\");

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() + "\");

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

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

13      }

14   }

 

© 2017-2023 Altova GmbH