1 /* |
|
2 * Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 /** ----------------------------------------------------------------------- ** |
|
20 @package: NW_DOM |
|
21 |
|
22 @synopsis: default |
|
23 |
|
24 @description: default |
|
25 |
|
26 ** ----------------------------------------------------------------------- **/ |
|
27 #ifndef NW_DOM_ATTRIBUTE_H |
|
28 #define NW_DOM_ATTRIBUTE_H |
|
29 |
|
30 #include <xml/cxml/cxml_proj.h> |
|
31 #include <xml/cxml/nw_dom_node.h> |
|
32 #include <xml/cxml/nw_tinytree.h> |
|
33 |
|
34 #ifdef __cplusplus |
|
35 extern "C" { |
|
36 #endif /* __cplusplus */ |
|
37 |
|
38 |
|
39 /** ----------------------------------------------------------------------- ** |
|
40 @struct: NW_DOM_AttributeListIterator |
|
41 |
|
42 @synopsis: Iterates over the list of attributes of an element. |
|
43 |
|
44 @scope: public |
|
45 @variables: |
|
46 NW_TinyDom_AttrListHandle_t attrListHandle |
|
47 this object |
|
48 |
|
49 NW_TinyTree_Node_t* node |
|
50 default |
|
51 |
|
52 @description: |
|
53 |
|
54 The NW_DOM_AttributeListIterator_t data type can be |
|
55 thought of as a replacement for the NamedNodeMap |
|
56 structure specified in the W3C DOM specification. In |
|
57 this specification, performing getAttributes on an |
|
58 element results in getting a readonly NamedNodeMap |
|
59 structure, whereas in WAP DOM it results in getting a |
|
60 pointer to the NW_DOM_AttributeListIterator_t data |
|
61 type. |
|
62 |
|
63 The main difference between the two is that |
|
64 NamedNodeMap allows you to get items using an index, |
|
65 whereas using NW_DOM_AttributeListIterator_t you can |
|
66 iterate over a list of attributes. Other |
|
67 functionality available in NamedNodeMap, such as |
|
68 getNamedItem, setNamedItem, removeNamedItem, is |
|
69 already present in the APIs defined for an |
|
70 ElementNode. |
|
71 |
|
72 NW_DOM_AttributeListIterator_t is used to iterate over |
|
73 the list of attributes of an element. Note that when a |
|
74 tree is built by the parser, only the first attribute |
|
75 of an element has a node of its own. For example, |
|
76 <card id="card1" title="example"> has 2 attributes, |
|
77 but only 1 node is allocated, pointing to the first |
|
78 attribute start. In a read-write tree, each added |
|
79 attribute gets a new node. |
|
80 ** ----------------------------------------------------------------------- **/ |
|
81 typedef struct NW_DOM_AttributeListIterator_s { |
|
82 /* Used to iterate over the original attributes */ |
|
83 NW_TinyDom_AttrListHandle_t attrListHandle; |
|
84 /* Used to iterate over added attributes */ |
|
85 NW_TinyTree_Node_t* node; |
|
86 }NW_DOM_AttributeListIterator_t; |
|
87 |
|
88 /* An attribute value in the DOM API */ |
|
89 |
|
90 typedef NW_TinyDom_AttrVal_t NW_DOM_AttrVal_t; |
|
91 |
|
92 /** ----------------------------------------------------------------------- ** |
|
93 @struct: NW_DOM_AttributeHandle |
|
94 |
|
95 @synopsis: default |
|
96 |
|
97 @scope: public |
|
98 @variables: |
|
99 NW_TinyDom_AttributeHandle_t tinyHandle |
|
100 The attribute handle. |
|
101 |
|
102 NW_TinyTree_Node_t* node |
|
103 default |
|
104 |
|
105 @description: NW_DOM_AttributeHandle_t is used as an extension to |
|
106 support WBXML attributes. In WBXML, attibutes can |
|
107 consist of an attribute start token and several value |
|
108 components. Moreover, an attribute start token can |
|
109 represent either the attribute name, the attribute |
|
110 name and the initial part of the value (a so-called |
|
111 value prefix), or the complete attribute name and |
|
112 value.This type has methods that return these elements |
|
113 and allow iteration over the values. Attribute |
|
114 handles are also supported for XML documents since |
|
115 applications may wish to use the attribute list |
|
116 iterator mechanism for these documents. Attribute list |
|
117 iterators return attribute handles. |
|
118 |
|
119 NW_DOM_AttributeHandle is used to iterate over the |
|
120 values of an attribute. |
|
121 ** ----------------------------------------------------------------------- **/ |
|
122 typedef struct NW_DOM_AttributeHandle_s{ |
|
123 NW_TinyDom_AttributeHandle_t tinyHandle; |
|
124 NW_TinyTree_Node_t* node; |
|
125 }NW_DOM_AttributeHandle_t; |
|
126 |
|
127 |
|
128 /** ----------------------------------------------------------------------- ** |
|
129 @function: NW_DOM_AttributeListIterator_new |
|
130 |
|
131 @synopsis: Constructor. |
|
132 |
|
133 @scope: public |
|
134 |
|
135 @description: Allocates memory for NW_DOM_AttributeListIterator. |
|
136 Returns NULL in case of failure to do so. |
|
137 |
|
138 @returns: NW_DOM_AttributeListIterator_t* |
|
139 New iterator. |
|
140 |
|
141 ** ----------------------------------------------------------------------- **/ |
|
142 NW_DOM_AttributeListIterator_t* |
|
143 NW_DOM_AttributeListIterator_new(void); |
|
144 |
|
145 |
|
146 /** ----------------------------------------------------------------------- ** |
|
147 @function: NW_DOM_AttributeListIterator_initialize |
|
148 |
|
149 @synopsis: Initialize the iterator. |
|
150 |
|
151 @scope: public |
|
152 |
|
153 @parameters: |
|
154 [in-out] NW_DOM_AttributeListIterator_t* handle |
|
155 The attribute handle. |
|
156 |
|
157 @description: Initialize the iterator. |
|
158 |
|
159 @returns: NW_Status_t |
|
160 Status of operation. |
|
161 |
|
162 [NW_STAT_SUCCESS] |
|
163 Always returns this value. |
|
164 |
|
165 ** ----------------------------------------------------------------------- **/ |
|
166 NW_Status_t |
|
167 NW_DOM_AttributeListIterator_initialize(NW_DOM_AttributeListIterator_t* handle); |
|
168 |
|
169 |
|
170 /** ----------------------------------------------------------------------- ** |
|
171 @function: NW_DOM_AttributeListIterator_delete |
|
172 |
|
173 @synopsis: Delete the iterator. |
|
174 |
|
175 @scope: public |
|
176 |
|
177 @parameters: |
|
178 [in-out] NW_DOM_AttributeListIterator_t* handle |
|
179 The attribute handle. |
|
180 |
|
181 @description: Delete the iterator. |
|
182 |
|
183 @returns: NW_Status_t |
|
184 Status of operation. |
|
185 |
|
186 [NW_STAT_SUCCESS] |
|
187 Always returns this value. |
|
188 |
|
189 ** ----------------------------------------------------------------------- **/ |
|
190 NW_Status_t |
|
191 NW_DOM_AttributeListIterator_delete(NW_DOM_AttributeListIterator_t* handle); |
|
192 |
|
193 |
|
194 /** ----------------------------------------------------------------------- ** |
|
195 @function: NW_DOM_AttributeListIterator_getNextAttribute |
|
196 |
|
197 @synopsis: Get next attribute. |
|
198 |
|
199 @scope: public |
|
200 |
|
201 @parameters: |
|
202 [in] NW_DOM_AttributeListIterator_t* listIterator |
|
203 Iterator for the attribute list. |
|
204 |
|
205 [out] NW_DOM_AttributeHandle_t* attributeHandle |
|
206 A handle for an attribute. |
|
207 |
|
208 @description: Get next attribute. |
|
209 |
|
210 @returns: NW_Status_t |
|
211 Status of operation. |
|
212 |
|
213 [NW_DOM_BAD_INPUT_PARAM_ERR] |
|
214 Error on input. |
|
215 |
|
216 [NW_STAT_WBXML_ITERATE_MORE] |
|
217 More attributes available. |
|
218 |
|
219 [NW_STAT_WBXML_ITERATE_DONE] |
|
220 No more attributes available. |
|
221 |
|
222 ** ----------------------------------------------------------------------- **/ |
|
223 IMPORT_C NW_Status_t |
|
224 NW_DOM_AttributeListIterator_getNextAttribute(NW_DOM_AttributeListIterator_t* listIterator, |
|
225 NW_DOM_AttributeHandle_t* attributeHandle); |
|
226 |
|
227 |
|
228 /** ----------------------------------------------------------------------- ** |
|
229 @function: NW_DOM_AttributeHandle_new |
|
230 |
|
231 @synopsis: Create new handle. |
|
232 |
|
233 @scope: public |
|
234 |
|
235 @description: Create new handle. |
|
236 |
|
237 @returns: NW_DOM_AttributeHandle_t* |
|
238 Allocates memory for new handle. |
|
239 |
|
240 ** ----------------------------------------------------------------------- **/ |
|
241 NW_DOM_AttributeHandle_t* |
|
242 NW_DOM_AttributeHandle_new(void); |
|
243 |
|
244 |
|
245 /** ----------------------------------------------------------------------- ** |
|
246 @function: NW_DOM_AttributeHandle_delete |
|
247 |
|
248 @synopsis: Delete handle. |
|
249 |
|
250 @scope: public |
|
251 |
|
252 @parameters: |
|
253 [in-out] NW_DOM_AttributeHandle_t* handle |
|
254 The attribute handle. |
|
255 |
|
256 @description: Delete handle. |
|
257 |
|
258 @returns: NW_Status_t |
|
259 Status of operation. |
|
260 |
|
261 [NW_STATUS_SUCCESS] |
|
262 Always returns NW_STATUS_SUCCESS. |
|
263 |
|
264 ** ----------------------------------------------------------------------- **/ |
|
265 NW_Status_t |
|
266 NW_DOM_AttributeHandle_delete(NW_DOM_AttributeHandle_t* handle); |
|
267 |
|
268 |
|
269 /** ----------------------------------------------------------------------- ** |
|
270 @function: NW_DOM_AttributeHandle_initWithNode |
|
271 |
|
272 @synopsis: Initializes and Attribute Handle with an attribute node. |
|
273 |
|
274 @scope: public |
|
275 |
|
276 @parameters: |
|
277 [in-out] NW_DOM_AttributeHandle_t* handle |
|
278 The attribute handle. |
|
279 |
|
280 [in] NW_TinyDom_Parser_t* parser |
|
281 Parser to assign. |
|
282 |
|
283 [in] NW_TinyTree_Node_t* node |
|
284 Node to attach to handle. |
|
285 |
|
286 @description: Initializes and Attribute Handle with an attribute node. |
|
287 Note that only some attributes have nodes of their own. |
|
288 Such attributes are initilized by this method. |
|
289 |
|
290 @returns: NW_Status_t |
|
291 Status of operation. |
|
292 |
|
293 [NW_STAT_SUCCESS] |
|
294 Always returned. |
|
295 |
|
296 ** ----------------------------------------------------------------------- **/ |
|
297 NW_Status_t |
|
298 NW_DOM_AttributeHandle_initWithNode(NW_DOM_AttributeHandle_t* handle, |
|
299 NW_TinyDom_Parser_t* parser, |
|
300 NW_TinyTree_Node_t* node); |
|
301 |
|
302 |
|
303 /** ----------------------------------------------------------------------- ** |
|
304 @function: NW_DOM_AttributeHandle_initWithOffset |
|
305 |
|
306 @synopsis: Initializes and Attribute Handle with a offset. |
|
307 |
|
308 @scope: public |
|
309 |
|
310 @parameters: |
|
311 [in-out] NW_DOM_AttributeHandle_t* handle |
|
312 The attribute handle. |
|
313 |
|
314 [in] NW_TinyDom_Parser_t* parser |
|
315 Parser to use. |
|
316 |
|
317 [in] NW_TinyTree_Offset_t offset |
|
318 Offset to use. |
|
319 @description: Initializes and Attribute Handle with a offset. |
|
320 |
|
321 @returns: NW_Status_t |
|
322 Status of operation. |
|
323 |
|
324 [NW_STAT_SUCCESS] |
|
325 Always returned. |
|
326 |
|
327 ** ----------------------------------------------------------------------- **/ |
|
328 NW_Status_t |
|
329 NW_DOM_AttributeHandle_initWithOffset(NW_DOM_AttributeHandle_t* handle, |
|
330 NW_TinyDom_Parser_t* parser, |
|
331 NW_TinyTree_Offset_t offset); |
|
332 |
|
333 |
|
334 /** ----------------------------------------------------------------------- ** |
|
335 @function: NW_DOM_AttributeHandle_initWithStartToken |
|
336 |
|
337 @synopsis: Initializes an Attribute Handle with a WBXML start token. |
|
338 |
|
339 @scope: public |
|
340 |
|
341 @parameters: |
|
342 [in-out] NW_DOM_AttributeHandle_t* handle |
|
343 The attribute handle. |
|
344 |
|
345 [in] NW_TinyDom_Parser_t* parser |
|
346 Parser to use. |
|
347 |
|
348 [in] NW_Uint16 token |
|
349 The attribute start token with page. |
|
350 |
|
351 @description: Initializes an Attribute Handle with WBXML start token. |
|
352 |
|
353 @returns: NW_Status_t |
|
354 Status of operation. |
|
355 |
|
356 [NW_STAT_SUCCESS] |
|
357 Success |
|
358 |
|
359 [NW_STAT_OUT_OF_MEMORY] |
|
360 Out of memory. |
|
361 |
|
362 [NW_STAT_FAILURE] |
|
363 Failure |
|
364 |
|
365 ** ----------------------------------------------------------------------- **/ |
|
366 IMPORT_C NW_Status_t |
|
367 NW_DOM_AttributeHandle_initWithStartToken(NW_DOM_AttributeHandle_t* handle, |
|
368 NW_TinyDom_Parser_t* parser, |
|
369 NW_Uint16 fqToken); |
|
370 |
|
371 |
|
372 /** ----------------------------------------------------------------------- ** |
|
373 @function: NW_DOM_AttributeHandle_addVal |
|
374 |
|
375 @synopsis: Appends an attribute value to an existing attribute handle |
|
376 |
|
377 @scope: public |
|
378 |
|
379 @parameters: |
|
380 [in-out] NW_DOM_AttributeHandle_t* handle |
|
381 The attribute handle. |
|
382 |
|
383 [in] NW_DOM_AttrVal_t* value |
|
384 The attribute value to append to handle |
|
385 |
|
386 @description: Appends an attribute value to an existing attribute handle |
|
387 |
|
388 @returns: NW_Status_t |
|
389 Status of operation. |
|
390 |
|
391 [NW_STAT_SUCCESS] |
|
392 Success |
|
393 |
|
394 [NW_STAT_OUT_OF_MEMORY] |
|
395 Out of memory. |
|
396 |
|
397 [NW_STAT_FAILURE] |
|
398 Failure |
|
399 |
|
400 ** ----------------------------------------------------------------------- **/ |
|
401 IMPORT_C NW_Status_t |
|
402 NW_DOM_AttributeHandle_addVal(NW_DOM_AttributeHandle_t* handle, |
|
403 NW_DOM_AttrVal_t* value); |
|
404 |
|
405 |
|
406 /** ----------------------------------------------------------------------- ** |
|
407 @function: NW_DOM_AttributeHandle_getName |
|
408 |
|
409 @synopsis: Gets attribute name. |
|
410 |
|
411 @scope: public |
|
412 |
|
413 @parameters: |
|
414 [in] NW_DOM_AttributeHandle_t* handle |
|
415 The attribute handle. |
|
416 |
|
417 [out] NW_String_t* name |
|
418 Attribute name without prefix. |
|
419 |
|
420 @description: Returns the attribute name (without prefix if any) |
|
421 |
|
422 @returns: NW_Status_t |
|
423 Status of operation. |
|
424 |
|
425 [NW_STAT_SUCCESS] |
|
426 Name returned. |
|
427 |
|
428 [NW_STAT_OUT_OF_MEMORY] |
|
429 Ran out of memory. |
|
430 |
|
431 [NW_STAT_DOM_NO_STRING_RETURNED] |
|
432 Name not found. |
|
433 |
|
434 ** ----------------------------------------------------------------------- **/ |
|
435 IMPORT_C NW_Status_t |
|
436 NW_DOM_AttributeHandle_getName(NW_DOM_AttributeHandle_t* handle, |
|
437 NW_String_t* name); |
|
438 |
|
439 |
|
440 /** ----------------------------------------------------------------------- ** |
|
441 @function: NW_DOM_AttributeHandle_getToken |
|
442 |
|
443 @synopsis: Gets the token for the Attribute. |
|
444 |
|
445 @scope: public |
|
446 |
|
447 @parameters: |
|
448 [in] NW_DOM_AttributeHandle_t* handle |
|
449 The attribute handle. |
|
450 |
|
451 @description: Returns the token for the Attribute. |
|
452 |
|
453 @returns: An attribute start token represented as two bytes: the |
|
454 high order 8 bits represent the code page, the remaining |
|
455 bits represent the token; returns 0 if the handle is |
|
456 invalid or the document is not a WBXML document. |
|
457 |
|
458 ** ----------------------------------------------------------------------- **/ |
|
459 IMPORT_C NW_Uint16 |
|
460 NW_DOM_AttributeHandle_getToken(NW_DOM_AttributeHandle_t* handle); |
|
461 |
|
462 |
|
463 /** ----------------------------------------------------------------------- ** |
|
464 @function: NW_DOM_AttributeHandle_getValuePrefix |
|
465 |
|
466 @synopsis: Gets attribute prefix. |
|
467 |
|
468 @scope: public |
|
469 |
|
470 @parameters: |
|
471 [in] NW_DOM_AttributeHandle_t* handle |
|
472 The attribute handle. |
|
473 |
|
474 [out] NW_String_t* prefix |
|
475 Value prefix for the attribute. |
|
476 |
|
477 @description: Returns the attribute prefix (for e.g. href="http://" |
|
478 will return "http://". This is a WBXML-specific extension. |
|
479 Behavior is undefined for non-WBXML attributes. |
|
480 |
|
481 @returns: NW_Status_t |
|
482 Status of operation. |
|
483 |
|
484 [NW_STAT_SUCCESS] |
|
485 Got prefix. |
|
486 |
|
487 [NW_STAT_DOM_NO_VALUE_PREFIX] |
|
488 Error |
|
489 |
|
490 [NW_STAT_OUT_OF_MEMORY] |
|
491 Error |
|
492 |
|
493 [NW_STAT_DOM_NO_STRING_RETURNED] |
|
494 Error |
|
495 |
|
496 ** ----------------------------------------------------------------------- **/ |
|
497 IMPORT_C NW_Status_t |
|
498 NW_DOM_AttributeHandle_getValuePrefix(NW_DOM_AttributeHandle_t* handle, |
|
499 NW_String_t* prefix); |
|
500 |
|
501 |
|
502 /** ----------------------------------------------------------------------- ** |
|
503 @function: NW_DOM_AttributeHandle_getNameWithPrefix |
|
504 |
|
505 @synopsis: Gets the attribute name. |
|
506 |
|
507 @scope: public |
|
508 |
|
509 @parameters: |
|
510 [in] NW_DOM_AttributeHandle_t* handle |
|
511 The attribute handle. |
|
512 |
|
513 [out] NW_String_t* name |
|
514 Attribute name. |
|
515 |
|
516 @description: Returns the attribute name (with prefix if any). |
|
517 This is a WBXML-specific extension. Behavior is undefined |
|
518 for non-WBXML attributes. |
|
519 |
|
520 @returns: NW_Status_t |
|
521 Status of operation. |
|
522 |
|
523 [NW_STAT_SUCCESS] |
|
524 Name returned. |
|
525 |
|
526 [NW_STAT_DOM_NO_STRING_RETURNED] |
|
527 Error |
|
528 |
|
529 ** ----------------------------------------------------------------------- **/ |
|
530 NW_Status_t |
|
531 NW_DOM_AttributeHandle_getNameWithPrefix(NW_DOM_AttributeHandle_t* handle, |
|
532 NW_String_t* name); |
|
533 |
|
534 |
|
535 /** ----------------------------------------------------------------------- ** |
|
536 @function: NW_DOM_AttributeHandle_getNextVal |
|
537 |
|
538 @synopsis: Get next value from list. |
|
539 |
|
540 @scope: public |
|
541 |
|
542 @parameters: |
|
543 [in] NW_DOM_AttributeHandle_t* handle |
|
544 The attribute handle. |
|
545 |
|
546 [out] NW_DOM_AttrVal_t* attrVal |
|
547 The next attribute value. |
|
548 |
|
549 @description: Gets a value if one is still available through the |
|
550 iterator. Return status indicates if this is a valid |
|
551 value or the iterator has hit the end of the list. |
|
552 |
|
553 @returns: NW_Status_t |
|
554 Status of operation. |
|
555 |
|
556 [NW_STAT_WBXML_ITERATE_MORE] |
|
557 Valid value, more in list. |
|
558 |
|
559 [NW_STAT_WBXML_ITERATE_DONE] |
|
560 Not valid, done with list. |
|
561 |
|
562 ** ----------------------------------------------------------------------- **/ |
|
563 IMPORT_C NW_Status_t |
|
564 NW_DOM_AttributeHandle_getNextVal(NW_DOM_AttributeHandle_t* handle, |
|
565 NW_DOM_AttrVal_t* attrVal); |
|
566 |
|
567 |
|
568 /** ----------------------------------------------------------------------- ** |
|
569 @function: NW_DOM_AttributeHandle_getValue |
|
570 |
|
571 @synopsis: Gets string representation of attribute value. |
|
572 |
|
573 @scope: public |
|
574 |
|
575 @parameters: |
|
576 [in] NW_DOM_AttributeHandle_t* handle |
|
577 The attribute handle. |
|
578 |
|
579 [out] NW_String_t* value |
|
580 The attribute value as a string. |
|
581 |
|
582 @description: Gets string representation of attribute value. |
|
583 |
|
584 @returns: NW_Status_t |
|
585 Status of operation. |
|
586 |
|
587 [NW_STAT_SUCCESS] |
|
588 Value returned. |
|
589 |
|
590 [NW_STAT_DOM_NO_STRING_RETURNED] |
|
591 No string found. |
|
592 |
|
593 ** ----------------------------------------------------------------------- **/ |
|
594 IMPORT_C NW_Status_t |
|
595 NW_DOM_AttributeHandle_getValue(NW_DOM_AttributeHandle_t* handle, |
|
596 NW_String_t* value); |
|
597 |
|
598 |
|
599 /** ----------------------------------------------------------------------- ** |
|
600 @function: NW_DOM_AttributeHandle_getEncoding |
|
601 |
|
602 @synopsis: Returns the document encoding. |
|
603 |
|
604 @scope: public |
|
605 |
|
606 @parameters: |
|
607 [in] NW_DOM_AttributeHandle_t* handle |
|
608 The attribute handle. |
|
609 |
|
610 @description: Returns the document encoding. |
|
611 |
|
612 @returns: NW_Uint32 |
|
613 Attribute encoding. |
|
614 |
|
615 ** ----------------------------------------------------------------------- **/ |
|
616 IMPORT_C NW_Uint32 |
|
617 NW_DOM_AttributeHandle_getEncoding(NW_DOM_AttributeHandle_t* handle); |
|
618 |
|
619 |
|
620 /* ----------------------------------------------------------------------- ** |
|
621 Attribute values: |
|
622 In WBXML documents attribute values can be a combination of string, |
|
623 entity, extension, opaque, or token. |
|
624 ** ----------------------------------------------------------------------- **/ |
|
625 |
|
626 #define NW_DOM_ATTR_VAL_STRING 1 |
|
627 #define NW_DOM_ATTR_VAL_EXTENSION 2 |
|
628 #define NW_DOM_ATTR_VAL_ENTITY 3 |
|
629 #define NW_DOM_ATTR_VAL_OPAQUE 4 |
|
630 #define NW_DOM_ATTR_VAL_TOKEN 5 |
|
631 |
|
632 |
|
633 /** ----------------------------------------------------------------------- ** |
|
634 @function: NW_DOM_AttrVal_new |
|
635 |
|
636 @synopsis: Constructor. |
|
637 |
|
638 @scope: public |
|
639 |
|
640 @description: Constructor. |
|
641 |
|
642 @returns: NW_DOM_AttrVal_t* |
|
643 New attribute value. |
|
644 |
|
645 ** ----------------------------------------------------------------------- **/ |
|
646 NW_DOM_AttrVal_t* |
|
647 NW_DOM_AttrVal_new(void); |
|
648 |
|
649 |
|
650 /** ----------------------------------------------------------------------- ** |
|
651 @function: NW_DOM_AttrVal_initFromString |
|
652 |
|
653 @synopsis: Initialize attribute value from string. |
|
654 |
|
655 @scope: public |
|
656 |
|
657 @parameters: |
|
658 [in-out] NW_DOM_AttrVal_t* val |
|
659 The AttrVal structure. |
|
660 |
|
661 [in] NW_String_t* string |
|
662 String with which to initialize AttrVal. |
|
663 |
|
664 @description: Initializes an AttrVal of type NW_DOM_ATTR_VAL_STRING |
|
665 from a string. |
|
666 |
|
667 @returns: NW_Status_t |
|
668 Status of operation. |
|
669 |
|
670 [NW_STAT_SUCCESS] |
|
671 Initialized. |
|
672 |
|
673 ** ----------------------------------------------------------------------- **/ |
|
674 IMPORT_C NW_Status_t |
|
675 NW_DOM_AttrVal_initFromString (NW_DOM_AttrVal_t* val, |
|
676 NW_String_t* string); |
|
677 |
|
678 |
|
679 /** ----------------------------------------------------------------------- ** |
|
680 @function: NW_DOM_AttrVal_initFromEntity |
|
681 |
|
682 @synopsis: Initializes an attribute value. |
|
683 |
|
684 @scope: public |
|
685 |
|
686 @parameters: |
|
687 [in-out] NW_DOM_AttrVal_t* val |
|
688 The AttrVal structure. |
|
689 |
|
690 [in] NW_Uint32 entity |
|
691 Entity with which to initialize the attribute value. |
|
692 |
|
693 @description: Initializes an AttrVal of type NW_DOM_ATTR_VAL_ENTITY. |
|
694 |
|
695 @returns: NW_Status_t |
|
696 Status of operation. |
|
697 |
|
698 [NW_STAT_SUCCESS] |
|
699 Always returns success. |
|
700 |
|
701 ** ----------------------------------------------------------------------- **/ |
|
702 NW_Status_t |
|
703 NW_DOM_AttrVal_initFromEntity (NW_DOM_AttrVal_t* val, |
|
704 NW_Uint32 entity); |
|
705 |
|
706 |
|
707 /** ----------------------------------------------------------------------- ** |
|
708 @function: NW_DOM_AttrVal_initFromExtension |
|
709 |
|
710 @synopsis: Initializes an attribute value. |
|
711 |
|
712 @scope: public |
|
713 |
|
714 @parameters: |
|
715 [in-out] NW_DOM_AttrVal_t* val |
|
716 The AttrVal structure. |
|
717 |
|
718 [in] NW_Uint16 token |
|
719 Token that specifies the extension type. |
|
720 |
|
721 [in] NW_String_t* str |
|
722 String extension value. |
|
723 |
|
724 @description: Initializes an AttrVal of type NW_DOM_ATTR_VAL_EXTENSION. |
|
725 |
|
726 @returns: NW_Status_t |
|
727 Status of operation. |
|
728 |
|
729 [NW_STAT_SUCCESS] |
|
730 Always returns success. |
|
731 |
|
732 ** ----------------------------------------------------------------------- **/ |
|
733 NW_Status_t |
|
734 NW_DOM_AttrVal_initFromExtension (NW_DOM_AttrVal_t* val, |
|
735 NW_Uint16 token, |
|
736 NW_String_t* str); |
|
737 |
|
738 |
|
739 /** ----------------------------------------------------------------------- ** |
|
740 @function: NW_DOM_AttrVal_initFromExtensionInt |
|
741 |
|
742 @synopsis: Initializes an attribute value with the particular extension |
|
743 types EXT_T_[0,1,2] + uint32 where uint32 is not an |
|
744 index into the string table. |
|
745 |
|
746 @scope: public |
|
747 |
|
748 @parameters: |
|
749 [in-out] NW_DOM_AttrVal_t* val |
|
750 The AttrVal structure. |
|
751 |
|
752 [in] NW_Uint16 token |
|
753 Token from which the AttrVal will be initialized. |
|
754 The token must be one of EXT_T_[0,1,2]. |
|
755 |
|
756 [in] NW_Uint32 x |
|
757 The associated 32-bit unsigned value. |
|
758 |
|
759 @description: Initializes an AttrVal with the particular extension |
|
760 types EXT_T_[0,1,2] + uint32 where uint32 is not an |
|
761 index into the string table. |
|
762 |
|
763 @returns: NW_Status_t |
|
764 Status of operation. |
|
765 |
|
766 [NW_STAT_SUCCESS] |
|
767 Success. |
|
768 |
|
769 [NW_STAT_FAILURE] |
|
770 Failure if token is not one of EXT_T_[0,1,2]. |
|
771 |
|
772 ** ----------------------------------------------------------------------- **/ |
|
773 NW_Status_t |
|
774 NW_DOM_AttrVal_initFromExtensionInt (NW_DOM_AttrVal_t* val, |
|
775 NW_Uint16 token, |
|
776 NW_Uint32 x); |
|
777 |
|
778 /** ----------------------------------------------------------------------- ** |
|
779 @function: NW_DOM_AttrVal_initFromOpaque |
|
780 |
|
781 @synopsis: Initializes an attribute value. |
|
782 |
|
783 @scope: public |
|
784 |
|
785 @parameters: |
|
786 [in-out] NW_DOM_AttrVal_t* val |
|
787 The AttrVal structure. |
|
788 |
|
789 [in] NW_Uint32 length |
|
790 Length of the data from which val will be initialized. |
|
791 |
|
792 [in] NW_Byte* data |
|
793 Data from which val will be initialized. |
|
794 |
|
795 @description: Initializes an AttrVal of type NW_DOM_ATTR_VAL_OPAQUE. |
|
796 |
|
797 @returns: NW_Status_t |
|
798 Status of operation. |
|
799 |
|
800 [NW_STAT_SUCCESS] |
|
801 Always returns success. |
|
802 |
|
803 ** ----------------------------------------------------------------------- **/ |
|
804 NW_Status_t |
|
805 NW_DOM_AttrVal_initFromOpaque (NW_DOM_AttrVal_t* val, |
|
806 NW_Uint32 length, |
|
807 NW_Byte* data); |
|
808 |
|
809 |
|
810 /** ----------------------------------------------------------------------- ** |
|
811 @function: NW_DOM_AttrVal_initFromToken |
|
812 |
|
813 @synopsis: Initializes an AttrVal of type NW_DOM_ATTR_VAL_TOKEN |
|
814 |
|
815 @scope: public |
|
816 |
|
817 @parameters: |
|
818 [in-out] NW_DOM_AttrVal_t* val |
|
819 The AttrVal structure. |
|
820 |
|
821 [in] NW_Uint16 token |
|
822 Token from which AttrVal will be initialized. The token |
|
823 represents the attribute value and includes codepage |
|
824 information in its most significant 8 bits. |
|
825 |
|
826 @description: Initializes an AttrVal of type NW_DOM_ATTR_VAL_TOKEN |
|
827 with a token. |
|
828 |
|
829 @returns: NW_Status_t |
|
830 Status of operation. |
|
831 |
|
832 [NW_STAT_SUCCESS] |
|
833 Always returns success. |
|
834 |
|
835 ** ----------------------------------------------------------------------- **/ |
|
836 IMPORT_C NW_Status_t |
|
837 NW_DOM_AttrVal_initFromToken (NW_DOM_AttrVal_t* val, NW_Uint16 token); |
|
838 |
|
839 |
|
840 /** ----------------------------------------------------------------------- ** |
|
841 @function: NW_DOM_AttrVal_delete |
|
842 |
|
843 @synopsis: Destructor. |
|
844 |
|
845 @scope: public |
|
846 |
|
847 @parameters: |
|
848 [in-out] NW_DOM_AttrVal_t* attrVal |
|
849 The AttrVal structure. |
|
850 |
|
851 @description: Destructor. |
|
852 |
|
853 @returns: NW_Status_t |
|
854 Status of operation. |
|
855 |
|
856 [NW_STAT_SUCCESS] |
|
857 Always returns success. |
|
858 |
|
859 ** ----------------------------------------------------------------------- **/ |
|
860 NW_Status_t |
|
861 NW_DOM_AttrVal_delete (NW_DOM_AttrVal_t* attrVal); |
|
862 |
|
863 |
|
864 /** ----------------------------------------------------------------------- ** |
|
865 @function: NW_DOM_AttrVal_getType |
|
866 |
|
867 @synopsis: Returns the type of attribute value. |
|
868 |
|
869 @scope: public |
|
870 |
|
871 @parameters: |
|
872 [in] NW_DOM_AttrVal_t* val |
|
873 The AttrVal structure. |
|
874 |
|
875 @description: Returns the type of attribute value. |
|
876 |
|
877 @returns: NW_Uint16 |
|
878 NW_DOM_ATTR_VAL enumeration. |
|
879 |
|
880 [NW_DOM_ATTR_VAL_EXTENSION] |
|
881 Extension |
|
882 [NW_DOM_ATTR_VAL_STRING] |
|
883 String |
|
884 [NW_DOM_ATTR_VAL_ENTITY] |
|
885 Entity |
|
886 [NW_DOM_ATTR_VAL_TOKEN] |
|
887 Token |
|
888 [NW_DOM_ATTR_VAL_OPAQUE] |
|
889 Opaque |
|
890 [null] |
|
891 Unknown type. |
|
892 |
|
893 ** ----------------------------------------------------------------------- **/ |
|
894 IMPORT_C NW_Uint16 |
|
895 NW_DOM_AttrVal_getType(NW_DOM_AttrVal_t* val); |
|
896 |
|
897 |
|
898 /** ----------------------------------------------------------------------- ** |
|
899 @function: NW_DOM_AttrVal_setType |
|
900 |
|
901 @synopsis: Sets the type of attribute value. |
|
902 |
|
903 @scope: public |
|
904 |
|
905 @parameters: |
|
906 [in-out] NW_DOM_AttrVal_t* val |
|
907 The AttrVal structure. |
|
908 |
|
909 [in] NW_Uint16 type |
|
910 See NW_DOM_AttrVal_getType for values. |
|
911 |
|
912 @description: Sets the type of attribute value. |
|
913 |
|
914 @returns: NW_Status_t |
|
915 Status of operation. |
|
916 |
|
917 [NW_STAT_SUCCESS] |
|
918 Always returns success. |
|
919 |
|
920 ** ----------------------------------------------------------------------- **/ |
|
921 NW_Status_t |
|
922 NW_DOM_AttrVal_setType(NW_DOM_AttrVal_t* val, NW_Uint16 type); |
|
923 |
|
924 |
|
925 /** ----------------------------------------------------------------------- ** |
|
926 @function: NW_DOM_AttrVal_toString |
|
927 |
|
928 @synopsis: Gets representation of value. |
|
929 |
|
930 @scope: public |
|
931 |
|
932 @parameters: |
|
933 [in-out] NW_DOM_AttrVal_t* av |
|
934 The AttrVal structure. |
|
935 |
|
936 [in-out] NW_String_t* str |
|
937 String representation of attribute value. |
|
938 |
|
939 [in] NW_Uint32 encoding |
|
940 default |
|
941 |
|
942 @description: Gets representation of value. |
|
943 |
|
944 @returns: NW_Status_t |
|
945 Status of operation. |
|
946 |
|
947 [NW_STAT_SUCCESS] |
|
948 String returned. |
|
949 |
|
950 [NW_STAT_DOM_NO_STRING_RETURNED] |
|
951 Invalid type of AttrVal. |
|
952 |
|
953 [NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED] |
|
954 Invalid encoding. |
|
955 |
|
956 ** ----------------------------------------------------------------------- **/ |
|
957 IMPORT_C NW_Status_t |
|
958 NW_DOM_AttrVal_toString(NW_DOM_AttrVal_t* av, |
|
959 NW_String_t* str, |
|
960 NW_Uint32 encoding); |
|
961 |
|
962 |
|
963 /** ----------------------------------------------------------------------- ** |
|
964 @function: NW_DOM_AttrVal_getEntity |
|
965 |
|
966 @synopsis: Returns the associated entity. |
|
967 |
|
968 @scope: public |
|
969 |
|
970 @parameters: |
|
971 [in] NW_DOM_AttrVal_t* item |
|
972 The AttrVal structure. |
|
973 |
|
974 @description: Returns the associate entity if attribute value is of |
|
975 type NW_DOM_ATTR_VAL_ENTITY. |
|
976 |
|
977 @returns: NW_Uint32 |
|
978 The entity if val is of type entity; otherwise, 0. |
|
979 |
|
980 ** ----------------------------------------------------------------------- **/ |
|
981 NW_Uint32 |
|
982 NW_DOM_AttrVal_getEntity(NW_DOM_AttrVal_t* item); |
|
983 |
|
984 |
|
985 /** ----------------------------------------------------------------------- ** |
|
986 @function: NW_DOM_AttrVal_getExtensionToken |
|
987 |
|
988 @synopsis: Returns extension token. |
|
989 |
|
990 @scope: public |
|
991 |
|
992 @parameters: |
|
993 [in] NW_DOM_AttrVal_t* val. |
|
994 The AttrVal structure. |
|
995 |
|
996 [out] NW_Uint16* token |
|
997 The token. |
|
998 |
|
999 @description: If AttrVal is of type NW_DOM_ATTR_VAL_EXTENSION then |
|
1000 assigns token to out parameter and returns NW_STAT_SUCCESS. |
|
1001 If not, it returns NW_STAT_FAILURE. |
|
1002 |
|
1003 @returns: NW_Status_t |
|
1004 Status of operation. |
|
1005 |
|
1006 [NW_STAT_SUCCESS] |
|
1007 Success. |
|
1008 |
|
1009 [NW_STAT_FAILURE] |
|
1010 If AttrVal is of wrong type. |
|
1011 |
|
1012 ** ----------------------------------------------------------------------- **/ |
|
1013 NW_Status_t |
|
1014 NW_DOM_AttrVal_getExtensionToken(NW_DOM_AttrVal_t* val, |
|
1015 NW_Uint16* token); |
|
1016 |
|
1017 |
|
1018 /** ----------------------------------------------------------------------- ** |
|
1019 @function: NW_DOM_AttrVal_getExtension |
|
1020 |
|
1021 @synopsis: Returns the extension if the attribute. |
|
1022 |
|
1023 @scope: public |
|
1024 |
|
1025 @parameters: |
|
1026 [in] NW_DOM_AttrVal_t* item |
|
1027 The AttrVal structure. |
|
1028 |
|
1029 [out] NW_String_t* str |
|
1030 The string associated with the extension. |
|
1031 |
|
1032 @description: Returns the associated extension type if attribute value |
|
1033 is of type NW_DOM_ATTR_VAL_EXTENSION. |
|
1034 |
|
1035 @returns: NW_Uint16 |
|
1036 The extension token; or 0 if there are invalid input |
|
1037 parameters or if AttrVal is not of type extension. |
|
1038 |
|
1039 ** ----------------------------------------------------------------------- **/ |
|
1040 IMPORT_C NW_Uint16 |
|
1041 NW_DOM_AttrVal_getExtension(NW_DOM_AttrVal_t* item, |
|
1042 NW_String_t* str); |
|
1043 |
|
1044 |
|
1045 /** ----------------------------------------------------------------------- ** |
|
1046 @function: NW_DOM_AttrVal_getExtensionInt |
|
1047 |
|
1048 @synopsis: Only for EXT_T_[0,1,2] where associated value is not |
|
1049 a reference to the string table, returns value |
|
1050 |
|
1051 @scope: public |
|
1052 |
|
1053 @parameters: |
|
1054 [in] NW_DOM_AttrVal_t* val |
|
1055 The AttrVal structure. |
|
1056 |
|
1057 [out] NW_Uint32* x |
|
1058 Value associated with extension if it is an extension, |
|
1059 otherwise undefined. |
|
1060 |
|
1061 @description: If AttrVal is of type NW_DOM_ATTRVAL_EXTENSION and |
|
1062 it was created as EXT_T_[0,1,2] with an associated |
|
1063 value that is not a reference to the string table |
|
1064 (i.e., created with |
|
1065 NW_DOM_AttrVal_initFromExtensionInt()), then it |
|
1066 returns the value via the out parameter x and |
|
1067 returns NW_STAT_SUCCESS. Otherwise returns |
|
1068 NW_STAT_FAILURE and the value of x is undefined. |
|
1069 |
|
1070 @returns: NW_Status_t |
|
1071 |
|
1072 [NW_STAT_SUCCESS] |
|
1073 Success. |
|
1074 |
|
1075 [NW_STAT_FAILURE] |
|
1076 Failure. |
|
1077 |
|
1078 ** ----------------------------------------------------------------------- **/ |
|
1079 NW_Status_t |
|
1080 NW_DOM_AttrVal_getExtensionInt(NW_DOM_AttrVal_t* item, |
|
1081 NW_Uint32* x); |
|
1082 |
|
1083 |
|
1084 /** ----------------------------------------------------------------------- ** |
|
1085 @function: NW_DOM_AttrVal_getOpaque |
|
1086 |
|
1087 @synopsis: Returns the associated opaque type. |
|
1088 |
|
1089 @scope: public |
|
1090 |
|
1091 @parameters: |
|
1092 [in] NW_DOM_AttrVal_t* val |
|
1093 The AttrVal structure. |
|
1094 |
|
1095 [out] NW_Uint32* opaqueLen |
|
1096 Length of opaque data. |
|
1097 |
|
1098 @description: If attribute value is of type NW_DOM_ATTR_VAL_OPAQUE |
|
1099 returns the associated opaque data and length. |
|
1100 |
|
1101 @returns: NW_Byte* |
|
1102 A pointer to the opaque data; or NULL if there are |
|
1103 invalid input parameters or if AttrVal is not of type |
|
1104 Opaque. |
|
1105 |
|
1106 ** ----------------------------------------------------------------------- **/ |
|
1107 IMPORT_C NW_Byte* |
|
1108 NW_DOM_AttrVal_getOpaque(NW_DOM_AttrVal_t* val, |
|
1109 NW_Uint32* opaqueLen); |
|
1110 |
|
1111 |
|
1112 /** ----------------------------------------------------------------------- ** |
|
1113 @function: NW_DOM_AttrVal_getString |
|
1114 |
|
1115 @synopsis: Gets string of the attribute component. |
|
1116 |
|
1117 @scope: public |
|
1118 |
|
1119 @parameters: |
|
1120 [in] NW_DOM_AttrVal_t* item |
|
1121 The AttrVal structure. |
|
1122 |
|
1123 [out] NW_String_t* string |
|
1124 String associated with the AttrVal. |
|
1125 |
|
1126 @description: Returns the string if attribute is of type |
|
1127 NW_DOM_ATTR_VAL_STRING. |
|
1128 |
|
1129 @returns: NW_Status_t |
|
1130 Status of operation. |
|
1131 |
|
1132 ** ----------------------------------------------------------------------- **/ |
|
1133 NW_Status_t |
|
1134 NW_DOM_AttrVal_getString(NW_DOM_AttrVal_t* item, |
|
1135 NW_String_t* string); |
|
1136 |
|
1137 |
|
1138 /** ----------------------------------------------------------------------- ** |
|
1139 @function: NW_DOM_AttrVal_getToken |
|
1140 |
|
1141 @synopsis: Returns the associated token. |
|
1142 |
|
1143 @scope: public |
|
1144 |
|
1145 @parameters: |
|
1146 [in] NW_DOM_AttrVal_t* val |
|
1147 The AttrVal structure. |
|
1148 |
|
1149 @description: Returns the associated token if attribute value is |
|
1150 of type NW_DOM_ATTR_VAL_TOKEN. |
|
1151 |
|
1152 @returns: NW_Uint16 |
|
1153 The token if the attribute component value is of type |
|
1154 token; otherwise 0 |
|
1155 |
|
1156 ** ----------------------------------------------------------------------- **/ |
|
1157 NW_Uint16 |
|
1158 NW_DOM_AttrVal_getToken(NW_DOM_AttrVal_t* val); |
|
1159 |
|
1160 /* ----------------------------------------------------------------------- ** |
|
1161 PI Nodes |
|
1162 ** ----------------------------------------------------------------------- **/ |
|
1163 |
|
1164 |
|
1165 /** ----------------------------------------------------------------------- ** |
|
1166 @function: NW_DOM_ProcessingInstructionNode_getTarget |
|
1167 |
|
1168 @synopsis: Gets the name of the target for this processing instruction. |
|
1169 |
|
1170 @scope: public |
|
1171 |
|
1172 @parameters: |
|
1173 [in] NW_DOM_ProcessingInstructionNode_t* node |
|
1174 A processing instruction node. |
|
1175 |
|
1176 [out] NW_String_t* target |
|
1177 Name of the target. |
|
1178 |
|
1179 @description: Gets the name of the target for this processing instruction. |
|
1180 |
|
1181 @returns: NW_Status_t |
|
1182 Status of operation. |
|
1183 |
|
1184 [NW_STAT_SUCCESS] |
|
1185 Target returned. |
|
1186 |
|
1187 [NW_STAT_DOM_NODE_TYPE_ERR] |
|
1188 Not a DOM_ProcessingInstructionNode_t node. |
|
1189 |
|
1190 [NW_STAT_DOM_NO_STRING_RETURNED] |
|
1191 General error. |
|
1192 |
|
1193 ** ----------------------------------------------------------------------- **/ |
|
1194 NW_Status_t |
|
1195 NW_DOM_ProcessingInstructionNode_getTarget(NW_DOM_ProcessingInstructionNode_t* node, |
|
1196 NW_String_t* target); |
|
1197 |
|
1198 |
|
1199 /** ----------------------------------------------------------------------- ** |
|
1200 @function: NW_DOM_ProcessingInstructionNode_getTargetToken |
|
1201 |
|
1202 @synopsis: Returns the token associated with a WBXML PI node. |
|
1203 |
|
1204 @scope: public |
|
1205 |
|
1206 @parameters: |
|
1207 [in] NW_DOM_ProcessingInstructionNode_t* node |
|
1208 A processing instruction node. |
|
1209 |
|
1210 @description: Returns the token associated with a WBXML PI node. This |
|
1211 method complements the method |
|
1212 NW_DOM_ProcessingInstructionNode_getTarget. It is specific |
|
1213 to WBXML, and behavior is undefined for non-WBXML nodes. |
|
1214 |
|
1215 @returns: NW_Uint16 |
|
1216 The token associated with the target (most significant |
|
1217 8 bits represent codepage). |
|
1218 |
|
1219 ** ----------------------------------------------------------------------- **/ |
|
1220 IMPORT_C NW_Uint16 |
|
1221 NW_DOM_ProcessingInstructionNode_getTargetToken (NW_DOM_ProcessingInstructionNode_t* node); |
|
1222 |
|
1223 |
|
1224 /** ----------------------------------------------------------------------- ** |
|
1225 @function: NW_DOM_ProcessingInstructionNode_getData |
|
1226 |
|
1227 @synopsis: Gets the data associated with this processing instruction. |
|
1228 |
|
1229 @scope: public |
|
1230 |
|
1231 @parameters: |
|
1232 [in] NW_DOM_ProcessingInstructionNode_t* node |
|
1233 A processing instruction node. |
|
1234 |
|
1235 [out] NW_String_t* data |
|
1236 Data associated with the node. |
|
1237 |
|
1238 @description: Gets the data associated with this processing instruction. |
|
1239 |
|
1240 @returns: NW_Status_t |
|
1241 Status of operation. |
|
1242 |
|
1243 [NW_STAT_SUCCESS] |
|
1244 Data returned. |
|
1245 |
|
1246 [NW_STAT_DOM_NODE_TYPE_ERR] |
|
1247 Not a NW_DOM_ProcessingInstructionNode_t node. |
|
1248 |
|
1249 [NW_STAT_DOM_NO_STRING_RETURNED] |
|
1250 General error. |
|
1251 |
|
1252 ** ----------------------------------------------------------------------- **/ |
|
1253 NW_Status_t |
|
1254 NW_DOM_ProcessingInstructionNode_getData(NW_DOM_ProcessingInstructionNode_t* node, |
|
1255 NW_String_t* data); |
|
1256 |
|
1257 |
|
1258 /** ----------------------------------------------------------------------- ** |
|
1259 @function: NW_DOM_ProcessingInstructionNode_getHandle |
|
1260 |
|
1261 @synopsis: Gets the attribute handle associated with the node. |
|
1262 |
|
1263 @scope: public |
|
1264 |
|
1265 @parameters: |
|
1266 [in] NW_DOM_ProcessingInstructionNode_t* node |
|
1267 A processing instruction node. |
|
1268 |
|
1269 [in-out] NW_DOM_AttributeHandle_t* handle |
|
1270 Handle to get target and data. |
|
1271 |
|
1272 @description: Gets the attribute handle associated with the node. |
|
1273 This supports WBXML only. |
|
1274 |
|
1275 @returns: NW_Status_t |
|
1276 Status of operation. |
|
1277 |
|
1278 [NW_STAT_SUCCESS] |
|
1279 Handle returned. |
|
1280 |
|
1281 [NW_STAT_DOM_NODE_TYPE_ERR] |
|
1282 Not a processing instruction node. |
|
1283 |
|
1284 ** ----------------------------------------------------------------------- **/ |
|
1285 NW_Status_t |
|
1286 NW_DOM_ProcessingInstructionNode_getHandle(NW_DOM_ProcessingInstructionNode_t* node, |
|
1287 NW_DOM_AttributeHandle_t* handle); |
|
1288 |
|
1289 #ifdef __cplusplus |
|
1290 } /* extern "C" { */ |
|
1291 #endif /* __cplusplus */ |
|
1292 |
|
1293 #endif /* NW_DOM_ATTRIBUTE_H */ |
|