-
Notifications
You must be signed in to change notification settings - Fork 8
/
xml.js
129 lines (119 loc) · 3.71 KB
/
xml.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/**
* SuiteScript XML APIs
*/
/**
* Escape a string for use in an XML document
*
* @param {string} text string to escape
*
* @return {string}
* @since 2008.1
*/
function nlapiEscapeXML(text) {
}
/**
* Select a node from an XML node using XPath. Supports custom namespaces
* (nodes in default namespace can be referenced using "nlapi" as the prefix)
*
* @param {Node} node node being queried
* @param {string} xpath string containing XPath expression
*
* @return {Node}
* @since 2008.1
*/
function nlapiSelectNode(node, xpath) {
}
/**
* Select an array of nodes from an XML node using XPath. Supports custom namespaces
* (nodes in default namespace can be referenced using "nlapi" as the prefix)
*
* @param {Node} node node being queried
* @param {string} xpath string containing XPath expression
*
* @return {Node[]}
* @since 2008.1
*/
function nlapiSelectNodes(node, xpath) {
}
/**
* Select a value from an XML node using XPath. Supports custom namespaces
* (nodes in default namespace can be referenced using "nlapi" as the prefix)
*
* @param {Node} node node being queried
* @param {string} xpath string containing XPath expression
* @return {string}
* @since 2008.2
*/
function nlapiSelectValue(node, xpath) {
}
/**
* Select an array of values from an XML node using XPath. Supports custom namespaces
* (nodes in default namespace can be referenced using "nlapi" as the prefix)
*
* @param {Node} node node being queried
* @param {string} xpath string containing XPath expression
*
* @return {string[]}
* @since 2008.1
*/
function nlapiSelectValues(node, xpath) {
}
/**
* Convert a string into an XML document.
* Note that in Server SuiteScript XML is supported natively by the JS runtime using the e4x standard
* (http://en.wikipedia.org/wiki/E4X)
* This makes scripting XML simpler and more efficient. his API is useful if you want to navigate/query
* a structured XML document more effectively using either the Document API or NetSuite built- in XPath functions.
*
* @param {string} str string being parsed into an XML document
*
* @return {Node}
* @since 2008.1
*/
function nlapiStringToXML(str) {
}
/**
* Convert an XML document into a string.
* Note that in Server SuiteScript XML is supported natively by the JS runtime using the e4x standard
* (http://en.wikipedia.org/wiki/E4X)
* This makes scripting XML data simpler and more efficient. This API is useful if you want to serialize
* and store a Document in a custom field (for example).
*
* @param {Node} xml document being serialized into a string
*
* @return {string}
* @since 2008.1
*/
function nlapiXMLToString(xml) {
}
/**
* Validate that a given XML document conforms to a given XML schema.
* XML Schema Definition (XSD) is the expected schema format.
*
* @param {document} xmlDocument xml to validate
* @param {document} schemaDocument schema to enforce
* @param {string} schemaFolderId if your schema utilizes <import> or <include> tags which
* refer to sub-schemas by file name (as opposed to URL),
* provide the Internal Id of File Cabinet folder containing these
* sub-schemas as the schemaFolderId argument
*
* @throws {nlobjError} error containing validation failure message(s) - limited to first 10
*
* @since 2014.1
*/
function nlapiValidateXML(xmlDocument, schemaDocument, schemaFolderId) {
}
/**
* Generate a PDF from XML using the BFO report writer (see http://big.faceless.org/products/report/)
*
* @restriction Server SuiteScript only
* @governance 10 units
*
* @param {string} input string containing BFO compliant XHTML
*
* @return {nlobjFile}
* @exception {ERROR_PARSING_XML}
* @since 2009.1
*/
function nlapiXMLToPDF(input) {
}