The Official Blog of Patcoola

Im just a dude watching over my parents,
and trying to make cartoons and video games from home.

XML API [JavaScript]

, By Patcoola

Script Title: XML API
Programming Language: JavaScript
Date Created: 2020-03-31

Purpose: An easy to use interface to navigate XML documents.

Description: A XML application programming interface to load and navigate XML documents. Provides many useful functions.


Donate Now!

This might not be the best time, but making a blog is not easy. Would you consider donating?


xml.loader ( {

url: String
method: String [GET | POST], default GET
async: Boolean, default true
exec: Function

} );



// Checks if element has an attribute, returns a Boolean


// Returns the value of an attribute as a string


// Checks if a parent node contents an element with a given tag name, returns a Boolean


// Returns a DOM of elements with a given tag name within an element


// Returns an element with a given ID from an XML document;

// Manually select and process an XML document into the API


// Lists the XML documents in the API, returns a one dimensional array


// Lists the parent elements in an XML document, returns a two dimensional array [ Element Name, node ]


// Returns the number of XML documents in the API


// Removes an XML document from the API


// Returns the value of an element, value data type is set by the data-type attribute or by a definitions table


// Scans an element and returns a two dimensional array [ Element Name, node ]


// Scans an elements and returns the nodes as objects { name: node }


// Converts an XML string into an XML document, returns an XML document

Example Usage

xml.loader ( {

url: “cuesheet.xml”,

exec: helloworld

} );

function helloworld () {

alert ( “Hello world the document was loaded!” );




Donate Now!

Hey buddy, it takes a lot to make a blog. How about a donation?


Post Meta

Share Post


Comments: Write Comment

Be the first to write a comment.

Leave a Comment

All comments are reviewed before publishing. Comments must be related to the page topic, must not be spam, and must comply with the criminal code of Canada.