- HANDLERS
- STYLES
A perl module for parsing XML documents. To install XML::Parser::Style::Tree, simply copy and paste either of the commands in to your terminal. Eclipse works on Mac OS and it is one of the best XML editor around, actually. It has XSD validation, autocompletion towards this schema. It has XSD validation, autocompletion towards this schema. Also, it offers a graphical XSD designer.
Yq: Command-line YAML/XML processor - jq wrapper for YAML and XML documents Installation pip install yq Before using yq, you also have to install its dependency, jq. See the jq installation instructions for details and directions specific to your platform. On macOS, yq is also available on Homebrew: use brew install python-yq. MacOS Artifact Parsing Tool macapt is a DFIR tool to process Mac computer full disk images ( or live machines ) and extract data/metadata useful for forensic investigation. It is a python based framework, which has plugins to process individual artifacts (such as Safari internet history, Network interfaces, Recently accessed files & volumes,.).
XML::Parser - A perl module for parsing XML documents
This module provides ways to parse XML documents. It is built on top of XML::Parser::Expat, which is a lower level interface to James Clark's expat library. Each call to one of the parsing methods creates a new instance of XML::Parser::Expat which is then used to parse the document. Expat options may be provided when the XML::Parser object is created. These options are then passed on to the Expat object on each parse call. They can also be given as extra arguments to the parse methods, in which case they override options given at XML::Parser creation time.
The behavior of the parser is controlled either by
'STYLES'
and/or 'HANDLERS'
options, or by 'setHandlers' method. These all provide mechanisms for XML::Parser to set the handlers needed by XML::Parser::Expat. If neither Style
nor Handlers
are specified, then parsing just checks the document for being well-formed.When underlying handlers get called, they receive as their first parameter the Expat object, not the Parser object.
This is a class method, the constructor for XML::Parser. Options are passed as keyword value pairs. Recognized options are:
- StyleThis option provides an easy way to create a given style of parser. The built in styles are: 'Debug', 'Subs', 'Tree', 'Objects', and 'Stream'. These are all defined in separate packages under
XML::Parser::Style::*
, and you can find further documentation for each style both below, and in those packages.Custom styles can be provided by giving a full package name containing at least one '::'. This package should then have subs defined for each handler it wishes to have installed. See 'STYLES' below for a discussion of each built in style. - HandlersWhen provided, this option should be an anonymous hash containing as keys the type of handler and as values a sub reference to handle that type of event. All the handlers get passed as their 1st parameter the instance of expat that is parsing the document. Further details on handlers can be found in 'HANDLERS'. Any handler set here overrides the corresponding handler set with the Style option.
- PkgSome styles will refer to subs defined in this package. If not provided, it defaults to the package which called the constructor.
- ErrorContextThis is an Expat option. When this option is defined, errors are reported in context. The value should be the number of lines to show on either side of the line in which the error occurred.
- ProtocolEncodingThis is an Expat option. This sets the protocol encoding name. It defaults to none. The built-in encodings are:
UTF-8
,ISO-8859-1
,UTF-16
, andUS-ASCII
. Other encodings may be used if they have encoding maps in one of the directories in the @Encoding_Path list. Check 'ENCODINGS' for more information on encoding maps. Setting the protocol encoding overrides any encoding in the XML declaration. - NamespacesThis is an Expat option. If this is set to a true value, then namespace processing is done during the parse. See 'Namespaces' in XML::Parser::Expat for further discussion of namespace processing.
- NoExpandThis is an Expat option. Normally, the parser will try to expand references to entities defined in the internal subset. If this option is set to a true value, and a default handler is also set, then the default handler will be called when an entity reference is seen in text. This has no effect if a default handler has not been registered, and it has no effect on the expansion of entity references inside attribute values.
- Stream_DelimiterThis is an Expat option. It takes a string value. When this string is found alone on a line while parsing from a stream, then the parse is ended as if it saw an end of file. The intended use is with a stream of xml documents in a MIME multipart format. The string should not contain a trailing newline.
- ParseParamEntThis is an Expat option. Unless standalone is set to 'yes' in the XML declaration, setting this to a true value allows the external DTD to be read, and parameter entities to be parsed and expanded.
- NoLWPThis option has no effect if the ExternEnt or ExternEntFin handlers are directly set. Otherwise, if true, it forces the use of a file based external entity handler.
- Non_Expat_OptionsIf provided, this should be an anonymous hash whose keys are options that shouldn't be passed to Expat. This should only be of concern to those subclassing XML::Parser.
This method registers handlers for various parser events. It overrides any previous handlers registered through the Style or Handler options or through earlier calls to setHandlers. By providing a false or undefined value as the handler, the existing handler can be unset.
This method returns a list of type, handler pairs corresponding to the input. The handlers returned are the ones that were in effect prior to the call.
See a description of the handler types in 'HANDLERS'.
The SOURCE parameter should either be a string containing the whole XML document, or it should be an open IO::Handle. Constructor options to XML::Parser::Expat given as keyword-value pairs may follow the SOURCE parameter. These override, for this call, any options or attributes passed through from the XML::Parser instance.
A die call is thrown if a parse error occurs. Otherwise it will return 1 or whatever is returned from the Final handler, if one is installed. In other words, what parse may return depends on the style.
This is just an alias for parse for backwards compatibility.
Open FILE for reading, then call parse with the open handle. The file is closed no matter how parse returns. Returns what parse returns.
Create and return a new instance of XML::Parser::ExpatNB. Constructor options may be provided. If an init handler has been provided, it is called before returning the ExpatNB object. Documents are parsed by making incremental calls to the parse_more method of this object, which takes a string. A single call to the parse_done method of this object, which takes no arguments, indicates that the document is finished.
If there is a final handler installed, it is executed by the parse_done method before returning and the parse_done method returns whatever is returned by the final handler.
Expat is an event based parser. As the parser recognizes parts of the document (say the start or end tag for an XML element), then any handlers registered for that type of an event are called with suitable parameters. All handlers receive an instance of XML::Parser::Expat as their first argument. See 'METHODS' in XML::Parser::Expat for a discussion of the methods that can be called on this object.
Init (Expat)
This is called just before the parsing of the document starts.
Final (Expat)
This is called just after parsing has finished, but only if no errors occurred during the parse. Parse returns what this returns.
Start (Expat, Element [, Attr, Val [,..]])
This event is generated when an XML start tag is recognized. Element is the name of the XML element type that is opened with the start tag. The Attr & Val pairs are generated for each attribute in the start tag.
End (Expat, Element)
This event is generated when an XML end tag is recognized. Note that an XML empty tag (<foo/>) generates both a start and an end event.
Char (Expat, String)
This event is generated when non-markup is recognized. The non-markup sequence of characters is in String. A single non-markup sequence of characters may generate multiple calls to this handler. Whatever the encoding of the string in the original document, this is given to the handler in UTF-8.
Proc (Expat, Target, Data)
This event is generated when a processing instruction is recognized.
Comment (Expat, Data)
This event is generated when a comment is recognized.
CdataStart (Expat)
This is called at the start of a CDATA section.
CdataEnd (Expat)
This is called at the end of a CDATA section.
Default (Expat, String)
This is called for any characters that don't have a registered handler. This includes both characters that are part of markup for which no events are generated (markup declarations) and characters that could generate events, but for which no handler has been registered.
Whatever the encoding in the original document, the string is returned to the handler in UTF-8.
Unparsed (Expat, Entity, Base, Sysid, Pubid, Notation)
This is called for a declaration of an unparsed entity. Entity is the name of the entity. Base is the base to be used for resolving a relative URI. Sysid is the system id. Pubid is the public id. Notation is the notation name. Base and Pubid may be undefined.
Notation (Expat, Notation, Base, Sysid, Pubid)
This is called for a declaration of notation. Notation is the notation name. Base is the base to be used for resolving a relative URI. Sysid is the system id. Pubid is the public id. Base, Sysid, and Pubid may all be undefined.
ExternEnt (Expat, Base, Sysid, Pubid)
This is called when an external entity is referenced. Base is the base to be used for resolving a relative URI. Sysid is the system id. Pubid is the public id. Base, and Pubid may be undefined.
This handler should either return a string, which represents the contents of the external entity, or return an open filehandle that can be read to obtain the contents of the external entity, or return undef, which indicates the external entity couldn't be found and will generate a parse error.
If an open filehandle is returned, it must be returned as either a glob (*FOO) or as a reference to a glob (e.g. an instance of IO::Handle).
A default handler is installed for this event. The default handler is XML::Parser::lwp_ext_ent_handler unless the NoLWP option was provided with a true value, otherwise XML::Parser::file_ext_ent_handler is the default handler for external entities. Even without the NoLWP option, if the URI or LWP modules are missing, the file based handler ends up being used after giving a warning on the first external entity reference.
The LWP external entity handler will use proxies defined in the environment (http_proxy, ftp_proxy, etc.).
Please note that the LWP external entity handler reads the entire entity into a string and returns it, where as the file handler opens a filehandle.
Also note that the file external entity handler will likely choke on absolute URIs or file names that don't fit the conventions of the local operating system.
The expat base method can be used to set a basename for relative pathnames. If no basename is given, or if the basename is itself a relative name, then it is relative to the current working directory.
ExternEntFin (Expat)
This is called after parsing an external entity. It's not called unless an ExternEnt handler is also set. There is a default handler installed that pairs with the default ExternEnt handler.
If you're going to install your own ExternEnt handler, then you should set (or unset) this handler too.
Entity (Expat, Name, Val, Sysid, Pubid, Ndata, IsParam)
This is called when an entity is declared. For internal entities, the Val parameter will contain the value and the remaining three parameters will be undefined. For external entities, the Val parameter will be undefined, the Sysid parameter will have the system id, the Pubid parameter will have the public id if it was provided (it will be undefined otherwise), the Ndata parameter will contain the notation for unparsed entities. If this is a parameter entity declaration, then the IsParam parameter is true.
Note that this handler and the Unparsed handler above overlap. If both are set, then this handler will not be called for unparsed entities.
Element (Expat, Name, Model)
The element handler is called when an element declaration is found. Name is the element name, and Model is the content model as an XML::Parser::Content object. See 'XML::Parser::ContentModel Methods' in XML::Parser::Expat for methods available for this class.
Attlist (Expat, Elname, Attname, Type, Default, Fixed)
This handler is called for each attribute in an ATTLIST declaration. So an ATTLIST declaration that has multiple attributes will generate multiple calls to this handler. The Elname parameter is the name of the element with which the attribute is being associated. The Attname parameter is the name of the attribute. Type is the attribute type, given as a string. Default is the default value, which will either be '#REQUIRED', '#IMPLIED' or a quoted string (i.e. the returned string will begin and end with a quote character). If Fixed is true, then this is a fixed attribute.
Doctype (Expat, Name, Sysid, Pubid, Internal)
This handler is called for DOCTYPE declarations. Name is the document type name. Sysid is the system id of the document type, if it was provided, otherwise it's undefined. Pubid is the public id of the document type, which will be undefined if no public id was given. Internal is the internal subset, given as a string. If there was no internal subset, it will be undefined. Internal will contain all whitespace, comments, processing instructions, and declarations seen in the internal subset. The declarations will be there whether or not they have been processed by another handler (except for unparsed entities processed by the Unparsed handler). However, comments and processing instructions will not appear if they've been processed by their respective handlers.
* DoctypeFin (Parser)
This handler is called after parsing of the DOCTYPE declaration has finished, including any internal or external DTD declarations.
XMLDecl (Expat, Version, Encoding, Standalone)
This handler is called for xml declarations. Version is a string containing the version. Encoding is either undefined or contains an encoding string. Standalone will be either true, false, or undefined if the standalone attribute is yes, no, or not made respectively.
Debug
This just prints out the document in outline form. Nothing special is returned by parse.
Subs
Each time an element starts, a sub by that name in the package specified by the Pkg option is called with the same parameters that the Start handler gets called with.
Each time an element ends, a sub with that name appended with an underscore ('_'), is called with the same parameters that the End handler gets called with.
Xml Parser For Macos 7
Nothing special is returned by parse.
Tree
Parse will return a parse tree for the document. Each node in the tree takes the form of a tag, content pair. Text nodes are represented with a pseudo-tag of '0' and the string that is their content. For elements, the content is an array reference. The first item in the array is a (possibly empty) hash reference containing attributes. The remainder of the array is a sequence of tag-content pairs representing the content of the element.
So for example the result of parsing:
would be:
The root document 'foo', has 3 children: a 'head' element, a 'bar' element and the text 'do'. After the empty attribute hash, these are represented in it's contents by 3 tag-content pairs.
Objects
This is similar to the Tree style, except that a hash object is created for each element. The corresponding object will be in the class whose name is created by appending '::' and the element name to the package set with the Pkg option. Non-markup text will be in the ::Characters class. The contents of the corresponding object will be in an anonymous array that is the value of the Kids property for that object.
Stream
This style also uses the Pkg package. If none of the subs that this style looks for is there, then the effect of parsing with this style is to print a canonical copy of the document without comments or declarations. All the subs receive as their 1st parameter the Expat instance for the document they're parsing.
It looks for the following routines:
- StartDocumentCalled at the start of the parse .
- StartTagCalled for every start tag with a second parameter of the element type. The $_ variable will contain a copy of the tag and the %_ variable will contain attribute values supplied for that element.
- EndTagCalled for every end tag with a second parameter of the element type. The $_ variable will contain a copy of the end tag.
- TextCalled just before start or end tags with accumulated non-markup text in the $_ variable.
- PICalled for processing instructions. The $_ variable will contain a copy of the PI and the target and data are sent as 2nd and 3rd parameters respectively.
- EndDocumentCalled at conclusion of the parse.
XML documents may be encoded in character sets other than Unicode as long as they may be mapped into the Unicode character set. Expat has further restrictions on encodings. Read the xmlparse.h header file in the expat distribution to see details on these restrictions.
Expat has built-in encodings for:
UTF-8
, ISO-8859-1
, UTF-16
, and US-ASCII
. Encodings are set either through the XML declaration encoding attribute or through the ProtocolEncoding option to XML::Parser or XML::Parser::Expat.For encodings other than the built-ins, expat calls the function load_encoding in the Expat package with the encoding name. This function looks for a file in the path list @XML::Parser::Expat::Encoding_Path, that matches the lower-cased name with a '.enc' extension. The first one it finds, it loads.
If you wish to build your own encoding maps, check out the XML::Encoding module from CPAN.
Larry Wall <[email protected]> wrote version 1.0.
Clark Cooper <[email protected]> picked up support, changed the API for this version (2.x), provided documentation, and added some standard package features.
Matt Sergeant <[email protected]> is now maintaining XML::Parser
To install XML::Parser, simply copy and paste either of the commands in to your terminal
For more information on module installation please visit the detailed CPAN module installation guide.
allowed-os-versions
Defines OS version requirements. These consist of one or more version ranges, specified as
os-version
elements. The version of the operating system on the target volume must fall into one of these ranges to allow installation.Attributes
None.
Availability
Available in OS X v10.6.6 and later.
Content
This element can contain the following element:
- os-version (one or more): The supported OS versions.
app
Identifies an application that must be closed before the package is installed.
Attributes
Attribute name | Type | Description |
---|---|---|
id | String | Required. The bundle identifier of the application. |
Content
None.
auxinfo
Reserved.
background
Defines a background image for the Installer.
Attributes
Requirements: You must provide either the
mime-type
or uti
attribute. If you provide both, they must be consistent.Attribute name | Type | Description |
---|---|---|
alignment | String | Optional. The alignment used to render the background image. Values: center (default), left , right , top , bottom , topleft , topright , bottomleft , and bottomright .Only used by the Installer. |
file | String | Required. The filename of an image in the distribution package—for example, background.png or ./background.png . |
mime-type | String | The standard MIME type of the image. |
scaling | String | Optional. The scaling used to render the background image. Values: tofit (default), none , and proportional . |
uti | String | The UTI type of the image. This attribute is provided because some file types don’t have a MIME type. |
Content
None.
bundle
Defines a single bundle. The meaning of this element differs considerably depending on its parent element; see the parent element’s documentation for details.
Attributes
Attribute name | Type | Description |
---|---|---|
CFBundleShortVersionString | String | Optional. The short version string of the bundle, as defined in its Info.plist file. |
CFBundleVersion | String | Optional. The bundle’s version, as defined in its Info.plist file. |
id | String | Required. The identifier of the bundle—that is, the value of CFBundleIdentifier in the bundle’s Info.plist file. |
path | String | Required. The path at which the bundle is installed, relative to where the package is installed. For example, Applications/Sample.app . |
search | Boolean | Optional. Indicates whether to search for the bundle by its identifier if it is not found at the given path. Values: false (default), true .Only valid when this element is a child of a required-bundles element. |
BuildVersion | - | Reserved. |
SourceVersion | - | Reserved. |
Content
None.
bundle-version
Defines the version of the bundles delivered by the parent element. You do not typically specify this element;
productbuild
inserts it from the actual package data when the product archive is created.Attributes
None.
Availability
Available in OS X v10.6.6 and later.
Content
This element can contain the following elements:
- bundle (one or more): The package-relative path and version strings of the bundles installed.
choice
Defines an installation choice of a distribution package.
Attributes
Attribute name | Type | Description |
---|---|---|
customLocation | Absolute file path | Optional. Specifies the default installation location, within the installation volume, for this choice. Implies that the user can choose a different installation location. If unspecified, the user cannot choose the installation location for this choice. |
customLocationAllowAlternateVolumes | Boolean | Optional if customLocation is specified; otherwise, not allowed. Specifies whether the user can choose the installation volume. Values: false (default) indicates that the user can choose a different location than what is given by customLocation but cannot change the volume; true indicates that the user can choose the installation volume and the location on that volume. A value of true is only valid for packages that use the Installer. |
description | String, localization key | Required for packages that use the Installer; otherwise, optional. Specifies the description of the installation choice. Localizable. |
description-mime-type | String | Optional. The MIME type of the text data in the description attribute. Values: text/plain (default), text/rtf , or text/html . |
enabled | Boolean JavaScript expression | Optional. Specifies whether the user can select or deselect this option in the Installer customization pane. If false , or a JavaScript expression that evaluates to false , the choice is dimmed so the user cannot select or deselect it. Re-evaluated as the user interacts with the choice tree, so a choice can be enabled or disabled based on the state of other choices. Default value is true . |
id | String | Required. Unique identifier of the installation choice, used to bind this element to the line element that determines its position in the installation-choice hierarchy.Must match the choice attribute of exactly one line element. |
selected | Boolean JavaScript expression | Optional. Specifies whether this option is selected or deselected for installation. If false , or a JavaScript expression that evaluates to false , the choice will not be installed. In general, you should not declare this attribute on a choice that is visible and enabled, because it can interfere with the user’s selections. Default value is true . |
start_enabled | Boolean | Optional. Specifies whether this option is initially enabled in the Installer customization pane. Values: true (default), or false . |
start_selected | Boolean | Optional. Specifies whether this option is initially selected or deselected for installation. Values: true (default), or false . |
start_visible | Boolean | Optional. Specifies whether this option is initially visible in the Installer customization pane. Values: true (default), or false . |
title | String, localization key | Required. Specifies the title of the installation choice. Localizable. |
visible | Boolean JavaScript expression | Optional. Specifies whether this option is visible in the Installer customization pane. If false , or a JavaScript expression that evaluates to false , the choice is hidden from the user. Default value is true .Avoid making choices appear and disappear while the user is interacting with the installation process. This provides a poor user experience. |
bundle | - | Reserved. |
customLocationIsSelfContained | - | Reserved. |
tooltip | - | Reserved. |
versStr | - | Reserved. |
Content
This element can contain the following element:
There is some hope that as MacOS phases out 32-bit compatibility mode that Wine might try to run things without needing that layer. Scummvm games loader for mac os free. Wine can't work at least for now because it requires multilib. The linux emulation layer has been gone for a long time and this likely won't come back because it was full of security holes.
- pkg-ref (zero or more): The choice’s packages. You should only associate packages with a choice that has no subchoices (as defined by the hierarchy of
line
elements).
choices-outline
Defines the installation-choice hierarchy of a distribution package.
Attributes
Content
This element can contain the following element:
- line (one or more): The top-level installation choices.
conclusion
Specifies text that is displayed by Installer at the end of the installation process.
Attributes
Requirements: You must provide either the
mime-type
or uti
attribute. If you provide both, they must be consistent.Attribute name | Type If you experience this problem, check for updates.3134All DevicesAll ModelsYou cannot log in to your computer from your device using pen or touch.What you can do about it while we fix it: You can use your mouse or touchpad. AffectedWhat you can expectAll DevicesAll modelsHorizontal scrolling with Pan/Scroll in Excel is scrolling opposite of what is expected.What you can do about it while we fix it: If it bothers you, use the scrollbar, keyboard, or touch to scroll.3136All DevicesAll modelsStraight line segments are present at the start of a stroke in some applications.What you can do about it while we fix it: We are working with the application developers to solve the problem. AffectedWhat you can expectAll DevicesAll modelsHorizontal scrolling with Pan/Scroll in Excel is scrolling opposite of what is expected.What you can do about it while we fix it: If it bothers you, use the scrollbar, keyboard, or touch to scroll.3136All DevicesAll modelsStraight line segments are present at the start of a stroke in some applications.What you can do about it while we fix it: We are working with the application developers to solve the problem. If you experience this problem, check for updates.3134All DevicesAll ModelsYou cannot log in to your computer from your device using pen or touch.What you can do about it while we fix it: You can use your mouse or touchpad. Mac intuos driver for mojave. | Description |
---|---|---|
file | String | Required. The filename of the conclusion file in the distribution package—for example, conclusion.rtf . |
mime-type | String | The MIME-type specifier for the data contained in the file. |
uti | String | The UTI-type specifier for the data contained in the file. |
language | - | Reserved. |
Content
None.
domains
Indicates what domains the package may be installed into. If this element is not present,
enable_anywhere
is true
, enable_currentUserHome
is false
, and enable_localSystem
is true
.Attributes
Attribute name | Type | Description |
---|---|---|
enable_anywhere | Boolean JavaScript expression | Required. If true , or a JavaScript expression that evaluates to true , the product can be installed at the root of any volume, including nonsystem volumes. Otherwise, it cannot be installed at the root of a volume. |
enable_currentUserHome | Boolean JavaScript expression | Required. If true , or a JavaScript expression that evaluates to true , the product can be installed into the current user’s home directory. Otherwise, it cannot be installed in the current user’s home directory.A home directory installation is done as the current user (not as root ), and it cannot write outside of the home directory. You should enable this only if the product can be installed in the user’s home directory and be completely functional from that location. |
enable_localSystem | Boolean JavaScript expression | Required. If true , or a JavaScript expression that evaluates to true , the product can be installed into the root directory. This attribute should usually be true unless the product can be installed only to the user’s home directory. |
Content
None.
installation-check
Specifies whether the installation host meets the distribution’s system requirements. The installation check passes if the script returns
true
, any RAM requirements are met, and any graphics requirements are met.Attributes
Attribute name | Type | Description |
---|---|---|
script | Boolean JavaScript expression | Optional. Specifies whether the requirements are met. If true (default), or a Boolean JavaScript expression that evaluates to true , the installation proceeds, subject to the other checks.If the script evaluates to false , it must also set my.result.type and my.result.message to indicate the severity of the problem and provide a message to display. If my.result.type is Warning , the installation may be allowed to proceed after informing the user. |
Content
This element can contain the following elements:
- ram (zero or one): The required RAM.
- required-graphics (zero or one): The GPU requirements.
installer-gui-script
The root element of the distribution definition. All other elements in the distribution definition file are children of this element.
Attributes
Attribute name | Type | Description |
---|---|---|
minSpecVersion | Integer | Required. The schema version of a distribution file. Use 1 for the version used prior to OS X v10.6.6, or 2 after that. |
maxSpecVersion | - | Reserved. |
verifiedSpecVersion | - | Reserved. |
Content
This element can contain the following elements:
- background (zero or one)
- choice (one or more)
- choices-outline (exactly one)
- conclusion (zero or one)
- domains (zero or one)
- installation-check (zero or one)
- license (zero or one)
- locator (zero or more)
- options (zero or one)
- pkg-ref (one or more)
- product (zero or one)
- readme (zero or one)
- script (zero or one)
- title (exactly one)
- volume-check (zero or one)
- welcome (zero or one)
license
Specifies text that is displayed by Installer during the installation process.
Attributes
Requirements: You must provide either the
mime-type
or uti
attribute. If you provide both, they must be consistent.Attribute name | Type | Description |
---|---|---|
file | String | Required. The filename of the welcome file in the distribution package—for example, welcome.rtf . |
mime-type | String | The MIME-type specifier for the data contained in the file. |
uti | String | The UTI-type specifier for the data contained in the file. |
auto | - | Reserved. |
language | - | Reserved. |
sla | - | Reserved. |
Content
None.
line
Defines where a choice fits into the installation-choice hierarchy of a distribution package.
Attributes
Attribute name | Type | Description |
---|---|---|
choice | String | Required. Identifies the installation choice associated with this node of the installation-choice hierarchy of a distribution package. The value must match the ID of a choice element. See choice.Do not reference the same ID from more than one line element, not even from different installation-choice hierarchies; if you do so, the behavior is undefined. |
Content
This element can contain the following element:
- line (zero or more): The subchoices of this choice.
localization
Reserved.
locator
Defines a search rule for finding software that is already installed on the system.
Attributes
None.
Content
This element can contain the following element:
- search (one or more): The search rule.
must-close
Identifies applications that must be closed before the package is installed.
Applications are considered only if the package that contains this element has been selected for installation.
Attributes
None.
Content
This element can contain the following element:
- app (one or more): The applications.
options
Specifies the installation properties of a package within the distribution.
Attributes
Attribute name | Type | Description |
---|---|---|
allow-external-scripts | Boolean | Optional. Specifies whether the run and runOnce JavaScript functions can be executed. Values: false (default) or true . For information about these functions, see System in Installer JavaScript Reference. |
customize | String | Optional. Specifies whether the user can customize the installation by selecting or deselecting installation choices. Values: allow (default) gives the user an opportunity to customize the installation, always presents the customization view automatically.never does not provide access to the customization view. |
hostArchitectures | String | Optional. A comma-separated list of supported architecture codes. Valid codes are i386 , x86_64 , and ppc . Note that i386 matches both 32-bit and 64-bit systems, but x86_64 matches only 64-bit systems. |
mpkg | String | Optional. Identifies a package ( pkg-ref element) whose installation operations must be performed as part of the installation of this distribution.Deprecated. |
require-scripts Steps for Mac OS X 10.9 Mavericks. Open System Preferences Security & Privacy. Click the Privacy tab. Click the lock icon to make changes. Select Accessibility from the list. Check the box next to any Mizage apps and System Events, that you wish to authorize. If you don't see the app you're trying to authorize, simply drag and drop the app from Finder to add it. Jun 25, 2013 OS X Mountain Lion’s method to enable assistive devices. After installing it on Mavericks, SizeUp gave us the familiar message about enabling assistive devices. No problem, we thought, as we opened System Preferences and headed over to the Accessibility Pane, where the. Access for assistive devices mac mojave county. Jan 15, 2017 Top 5 Hidden Mac Tricks in macOS Sierra - Duration: 4:59. Snazzy Labs 847,439 views. How to enable 'Access to assistive devices' in OSX 10.10 Yosemite - Duration: 2:05. Bartels Media GmbH. | Boolean | Optional. Indicates whether the distribution uses JavaScript code. Values: true (default) or false . If this value is false , all attributes whose value may be a JavaScript expression must be set to either true or false .Available in OS X v10.6.6 and later. |
rootVolumeOnly | Boolean | Optional. Specifies whether the user can choose an installation volume other than the boot volume. Values: true or false .Deprecated. Use domains instead. |
type | - | Reserved. |
visibleOnlyForPredicate | - | Reserved. |
Content
None.
os-version
Defines a range of supported OS versions.
This element is designed for you to use a specific OS version number for the
min
attribute, and a major OS version number for the before
attribute. The expectation is that you will know an exact minimum version but not an exact major version. This keeps you from having to guess the last minor revision before the next major revision, as you would have to do if the before
attribute were inclusive.Attributes
Attribute name | Type | Description |
---|---|---|
before | String | Optional. The maximum allowed version (exclusive). If the OS version is greater than or equal to this version, installation will be disallowed (unless the OS falls in the range of another os-version element). If no value is given, there is no upper bound on the range—any version newer than the minimum is allowed. |
min | String | Required. The minimum allowed version (inclusive). If the OS is less than this version, installation will be disallowed (unless the OS falls in the range of another os-version element). |
Content
None.
pkg-ref
References a component package that can be installed.
Attributes
Attribute name | Type | Description |
---|---|---|
active | Boolean JavaScript expression | Optional. Indicates whether the package is installed. Values: true (default), false . If false , or a JavaScript expression that evaluates to false, the package is not installed, even if its associated choice was selected.This provides an additional way to activate and deactivate packages. It overrides the setting on the parent element. |
auth | String | Defines the authorization level needed to install this package. Values: none or root .Deprecated. The installation domain determines the necessary authorization level. |
id | String | Required. Uniquely identifies a component package within a distribution package—for example, com.apple.TextEdit.pkg . The value of this attribute is usually the same as the component package’s identifier, but it is not required to be the same.If there are multiple pkg-ref elements with the same ID, their attributes will be collapsed together as if they were specified with a single element. In particular, a pkg-ref element with only an ID can be used inside of a choice element to bind that choice to a pkg-ref that is more fully defined elsewhere in the distribution file. |
installKBytes | Integer | Optional. Specifies the size of the package’s payload in kilobytes. You typically omit this attribute because productbuild sets it from the actual package when the product archive is created. |
onConclusion | String | Optional. Specifies the action to take after the installation has finished. Values, from lowest to highest: None (default), RequireLogout , RequireRestart , or RequireShutdown .The Installer takes the highest value from all enabled packages and requires the associated action. |
onConclusionScript | String | Optional. A JavaScript expression that evaluates to one of the string values expected for onConclusion . If this attribute is present, any onConclusion attribute is ignored.Available in OS X v10.7 and later. |
version | String | Required. Specifies the version of the package’s payload. You typically omit this attribute because productbuild will set it from the actual package when the product archive is created. |
archiveKBytes | - | Reserved. |
packageIdentifier | - | Reserved. |
Content
Required. A URL specifying the location of the installation package to which this element refers. Typically, you specify a simple filename and
productbuild
adjusts the URL as needed when the product archive is created. If you define multiple pkg-ref
elements with the same ID, exactly one of them should have text content.This element can contain the following elements:
- must-close (zero or one): The application(s) to be closed before installing this package.
- bundle-version (zero or one): The bundle version.
- relocate (zero or more): The information to support relocatable bundles.
To provide a
must-close
element, add a separate pkg-ref
element with the same ID to contain the must-close
element. For example:product
Defines a top-level product identifier and version. Used for distributing via the App Store.
Attributes
Attribute name | Type | Description |
---|---|---|
id | String | Required. The top-level product identifier. The value should be the same as the bundle identifier of the contained application. |
version | String | Required. The version string for the top-level product. The value should be the same as the short version string of the contained application. |
Availability
Available in OS X v10.6.6 and later.
Content
None.
ram
Specifies the minimum amount of RAM that the system must have.
Attributes
Attribute name | Type | Description |
---|---|---|
min-gb | String | Required. The minimum required RAM in gigabytes. (Consistent with how sizes are displayed in OS X v10.6 and later, a gigabyte is defined as 109 bytes, not 230 bytes.) |
Availability
Available in OS X v10.6.6 and later.
Content
None.
readme
Specifies text that is displayed by Installer during the installation process.
Attributes
Requirements: You must provide either the
mime-type
or uti
attribute. If you provide both, they must be consistent.Attribute name | Type | Description |
---|---|---|
file | String | Required. The filename of the readme file in the distribution package. For example, readme.rtf . |
mime-type | String | The MIME-type specifier for the data contained in the file. |
uti | String | The UTI-type specifier for the data contained in the file. |
language | - | Reserved. |
Content
None.
relocate
Describes a relocatable bundle. Relocatable bundles allow the user to install an upgrade in the same path as the current version. The path is located by the
search
element whose ID is specified by the search-id
attribute. The bundle is specified by the child bundle
element. For example, application bundles are typically relocatable.Attributes
Attribute name | Type | Description |
---|---|---|
search-id | String | Required. Specifies the ID of the search element whose results are applied to the bundle that is this element’s child element.If the search returns false , the relocate does nothing. If the search returns an array of results, the first result is used. |
Content
This element can contain the following element:
- bundle (exactly one): The bundle (within the package) that will be installed at the path. The only required attribute for this
bundle
element is its ID.
required-bundles
Specifies bundles that must be already installed on the system.
If the child
bundle
element has a version specified, this is interpreted as the minimum supported version for that bundle. It may also have its search
attribute set to true
, indicating that the bundle should be located by its identifier if it doesn’t exist at the specified path.Attributes
Attribute name | Type | Description |
---|---|---|
all | Boolean | Optional. Values: true (default) to require all of the specified bundles, or false to require at least one of them. |
description | String, localization key | Optional. A description of the required bundles, displayed to the user if the requirement is not met. |
Content
This element can contain the following element:
- bundle (one or more): The required bundles.
required-cl-device
Specifies requirements that must be met by at least one OpenCL device.
Attributes
None.
Availability
Available in OS X v10.7 and later.
Content
The predicate, as a string. For details about the predicate format, see the
productbuild
man page.To prevent characters in the predicate from being interpreted by the XML parser, mark it as CDATA content.
required-gl-renderer
Specifies requirements that must be met by at least one OpenGL hardware renderer.
Attributes
None.
Availability
Available in OS X v10.6.8 and later.
Content
The predicate, as a string. For details about the predicate format, see Specifying required OpenGL capabilities for the Mac App Store and the
productbuild
man page.To prevent characters in the predicate from being interpreted by the XML parser, mark it as CDATA content.
required-graphics
Specifies GPU requirements.
Attributes
Attribute name | Type | Description |
---|---|---|
description | String, localization key | Optional. A description of the graphics requirement. Localizable. If no description is specified, a generic message is used. It is generally best to use the generic message unless the requirements are very straightforward. |
single-device | Boolean | Optional. Values: false (default) to allow the OpenCL and OpenGL requirements to be met by different devices, or true to require a single device to simultaneously meet both requirements. |
Content
This element can contain the following elements:
- required-cl-device (zero or one): The OpenCL requirements.
- required-gl-renderer (zero or one): The OpenGL requirements.
script
Defines a set of JavaScript functions.
Attributes
Content
JavaScript code, typically the definition of functions called from attributes of other elements.
To prevent characters in the script from being interpreted by the XML parser, mark it as CDATA content:
If you choose not to mark your script as CDATA content, you must take great care to properly escape all characters that have special meaning in XML markup.
search
Defines a search rule for finding installed software. The result should be used by another search rule or bound to a bundle via a
relocate
element.Attributes
Attribute name | Type | Description |
---|---|---|
id | String | Required. Uniquely identifies the search; used in the search-id attribute of other elements to reference this search. |
script | String | Required if type is script ; otherwise, not allowed.A JavaScript expression that evaluates to false , a path as a string, or an array of paths. If it returns an array of paths, the first one is the preferred path.This expression can be a function call, but the called function must be defined in the child script element. |
search-id | String | Optional if type is component ; otherwise, not allowed.The ID of another search. The other search is performed, and its results further filtered by removing those results that don’t match the version strings given by the child bundle element. This allows the other search to be qualified for certain values of CFBundleShortVersionStrings or CFBundleVersions . |
search-path | String | Optional if type is component ; otherwise, not allowed.A path to a bundle. If there is a bundle at this path that matches the version string of this element’s child bundle element, then the path is used as the search result. |
type | String | Required. Indicates the type of the search. Valid values are: component Search for a bundle on disk that matches the identifier and version strings given by the child bundle element. By default, the Installer uses Launches Services to perform the search, and it searches only the volume that the user selected as the installation target. The search-id and search-path attributes modify this behavior.script Search by evaluating the JavaScript code contained in the script attribute. |
Content
This element must contain exactly one of the following elements:
- bundle: The bundle for a component search.
- script: The script for a script search.
strings
Reserved.
tag
Reserved.
tags
Reserved.
title
Defines the title of the product.
Attributes
None.
Content
The title or a localization key used to look up the title.
volume-check
Specifies whether a particular volume meets the distribution’s volume requirements. All of the tests in the
script
attribute and the child elements must pass.Attributes
Attribute name | Type | Description |
---|---|---|
script | Boolean JavaScript expression | Required. Specifies whether the requirements for installing on a particular volume are met. If the script evaluates to false , it must also set my.result.type and my.result.message to indicate the severity of the problem and provide a message to display.The property my.target.mountpoint contains the mount point of the volume being checked. |
Content
This element can contain the following elements:
- allowed-os-versions (zero or one): The versions of the OS to accept on the target volume.
- required-bundles (zero or one): The bundles that must already be present.
welcome
Specifies text that is displayed by Installer at the beginning of the installation process.
Xml Parser For Macos Mac
Attributes
Requirements: You must provide either the
mime-type
or uti
attribute. If you provide both, they must be consistent.Attribute name | Type | Description |
---|---|---|
file | String | Required. The filename of the welcome file in the distribution package—for example, welcome.rtf . |
mime-type | String | The MIME-type specifier for the data contained in the file. |
uti | String | The UTI-type specifier for the data contained in the file. |
language | - | Reserved. |
Content
Parsing Xml
None.
Xml Parser For Macos Windows 7
Copyright © 2012 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2012-12-13