what :
Home > Search > nodes

Objectspage : 1
dot.fraction Abstraction Looks at divisions of a list and outputs the highest value corresponding to nodes at 2 3 4 5 and 6 part divisions. Intended for use with dot.harmonicfilter.
sadam.dom Javaclass (mxj) A Document Object Model (DOM) interface for Max.
sadam.dom will create, read, store or even modify DOM trees. The DOM is one of the possible representations of the contents of an XML document (see http://www.w3.org/TR/DOM-Level-2-Core/.) The object internally uses the default Java DOM parser that comes as an instance of javax.xml.parsers.DocumentBuilderFactory, bringing all the power and almost all of the functionality of a W3C-certified DOM parser to MaxMSP. The kind of Nodes currently not handled by sadam.dom are: Comment, Entity, EntityReference, Notation and ProcessingInstruction.

When an XML is parsed, the object will assign a unique ID to each Element of the document, called the Element Index. This index won't get stored and changes each time when the order of Elements in the XML is modified (either by inserting or removing Elements). However, using the Element Index is the preferred (and in most cases, the only) way to address a given element in the XML. The Element Index is sent out the rightmost outlet each time an element is accessed. The Element Index of the Document Element is always 0, the rest of the Elements get their index in their 'order of appearence'. This means that even if an Element is being inserted or removed, the Index of the Elements that come earlier in the Document won't change.

When querying Attributes, Text, or CDATA nodes, the requested data will be sent out the appropriate outlets in right-to-left order (in case of Attributes, if more than one Attribute is requested, they will be sent to the output as a sequence like AttributeName1-AttributeValue1-AttributeName2-AttributeValue2-...-AttributeNameN-AttributeValueN, alternating on the appropriate outlets) followed by an error code. When querying Elements, the result will be sent out as a sequence (from right to left) consisting of the Element Index, the Tree Depth of the Element (the Document Element is at level 0, its children are at level 1 etc.), the Element's Tag Name, the Attributes, and finally the Text Content (which is a concatenation of all Text and CDATA nodes).

The leftmost outlet serves as an error outlet. After each command sent to the object, an error code is being sent back through this outlet at the end of the execution of the given command. A negative value means that the command could not be executed successfully, while 0 means success. In some cases (typically when one or more Elements are queried) the error outlet reports the number of Elements successfully returned.

sadam.dom and sadam.sax are both W3C compliant XML parsers, however, this means some overhead in terms of resources. If you need a lightweight, fast XML parser and you can live with some limitations regarding W3C compliance, consider using sadam.rapidXML.
sadam.rapidXML External A RapidXML wrapper for Max.
sadam.rapidXML will create, read, store or even modify DOM trees. The DOM is one of the possible representations of the contents of an XML document (see http://www.w3.org/TR/DOM-Level-2-Core/.) The object internally uses the RapidXML 1.13 library (see http://rapidxml.sourceforge.net/,) which is one of the fastest, yet still almost completely W3C compliant, freely available XML parsers.

When an XML is parsed, the object will assign a unique ID to each Element of the document, called the Element Index. This index won't get stored and changes each time when the order of Elements in the XML is modified (either by inserting or removing Elements). However, using the Element Index is the preferred (and in most cases, the only) way to address a given element in the XML. The Element Index is sent out the rightmost outlet each time an element is accessed. The Element Index of the Document Element is always 0, the rest of the Elements get their index in their 'order of appearence'. This means that even if an Element is being inserted or removed, the Index of the Elements that come earlier in the Document won't change.

When querying Attributes, Text, or CDATA nodes, the requested data will be sent out the appropriate outlets in right-to-left order (in case of Attributes, if more than one Attribute is requested, they will be sent to the output as a sequence like AttributeName1-AttributeValue1-AttributeName2-AttributeValue2-...-AttributeNameN-AttributeValueN, alternating on the appropriate outlets) followed by an error code. When querying Elements, the result will be sent out as a sequence (from right to left) consisting of the Element Index, the Tree Depth of the Element (the Document Element is at level 0, its children are at level 1 etc.), the Element's Tag Name, the Attributes, and finally the Text Content (which is a concatenation of all Text and CDATA nodes).

The leftmost outlet serves as an error outlet. After each command sent to the object, an error code is being sent back through this outlet at the end of the execution of the given command. A negative value means that the command could not be executed successfully, while 0 means success. In some cases (typically when one or more Elements are queried) the error outlet reports the number of Elements successfully returned.

As already mentioned, RapidXML 1.13 (and therefore sadam.rapidXML) is not fully W3C compliant. The main reason is that the parser ignores DOCTYPE declarations. There are also some difficulties with namespace management as well, the parser wouldn't refuse XMLs containing more than one root element and it will allow duplicate attributes for the same element. Also, to make parsing faster, all kind of XML validation is turned off by the wrapper Max object. If you need a 100% W3C compliant XML parser, consider sadam.dom, which is almost identical in functionality to sadam.rapidXML and requires MXJ to run.
sadam.sax Javaclass (mxj) A Simple API for XML (SAX) interface for Max.
sadam.sax will parse XML documents using SAX. The output will be sent out for each Element as a sequence (from right to left) consisting of the Element Index (the number of the Element in the XML), the Tree Depth of the Element (the Document Element is at level 0, its children are at level 1 etc.), the Element's Tag Name, the Attributes, and finally the Text Content (which is a concatenation of all Text and CDATA nodes). The leftmost outlet serves as an error outlet: if any error happens during parsing, it returns -1, otherwise it returns 0 after finishing the parsing process.

sadam.dom and sadam.sax are both W3C compliant XML parsers, however, this means some overhead in terms of resources. If you need a lightweight, fast XML parser and you can live with some limitations regarding W3C compliance, consider using sadam.rapidXML.
page : 1

4855 objects and 135 libraries within the database Last entries : December 23rd, 2023 Last comments : 0 0 visitor and 79963065 members connected RSS
Site under GNU Free Documentation License