API Docs for: 0.0.1
Show:

XMLParser Class

Extends Parser
Defined in: lib/parsers/xml.js:29
Module: niviz

An XML parser.

Constructor

XMLParser

(
  • data
)

Parameters:

Item Index

Properties

Methods

$

(
  • query
  • [node]
)
Element

Get the node with a certain tag.

Parameters:

Returns:

$

(
  • query
  • [node]
)
Element

Get all the nodes with a certain tag.

Parameters:

Returns:

_parse

() protected

This method needs to be implemented by all children of class Parser. Parse the complete document and return the result.

Returns:

end

() chainable

Inherited from Parser: lib/parser.js:176

This method must be called by the parsing methods when the parsing has finished.

parse

(
  • [callback]
)
Object

Inherited from Parser but overwritten in lib/parser.js:130

Starts the parsing process; in sync mode this method blocks until the parsing has finished, otherwise it should return immediately! If given a callback, it must be bound to the end and error events.

Parameters:

Returns:

Object: The parse result.

parse_xml

()

text

(
  • query
  • node
)
String

Parameters:

Returns:

String:

The text content the node

verify

() chainable

Inherited from Parser: lib/parser.js:165

Verify that all syntactic and semantic requirements are met by the parsed entity.

Properties

data

Object

Inherited from Parser: lib/parser.js:50

result

Object

Inherited from Parser: lib/parser.js:56