Xml2Json Class
            Defined in: 
            Module: xml2json
node -> see if https://github.com/isaacs/sax-js could be used instead
packages\node-opcua-xml2json\src\xml2json.js:142
        Constructor
Xml2Json
        
                
                    (
        
        
        
        
        
        
        
        
            
        
            - 
                                
options 
Parameters:
- 
                                
optionsReaderState- the state machine as a ReaderState node.
 
- 
                                            
[parser=null]ReaderState optional - 
                                            
[init|null]Function optional - 
                                            
[finish]Function optional - 
                                            
[startElement]Function optional - 
                                            
[endElement]Function optional 
 
Example:
var parser = new Xml2Json({ parser: { 'person': { init: function(name,attrs) { this.parent.root.obj = {}; this.obj = this.parent.root.obj; this.obj['name'] = attrs['name']; }, parser: { 'address': { finish: function(){ this.parent.obj['address'] = this.text; } } } } } });
var xml_string =  "
parser.parseString(xml_string, function() { parser.obj.should.eql({name: 'John',address: 'Paris'}); done(); });
Item Index
Methods
Methods
parse
                    
                            
                                (
                    
                    
                    
                    
                    
                    
                    
                            async
                    
                        
                    
                        - 
                                            
xmlFile - 
                                            
callback 
Parameters:
- 
                                            
xmlFileString- the name of the xml file to parse.
 
 - 
                                            
callbackFunction 
parseString
                    
                            
                                (
                    
                    
                    
                    
                    
                    
                    
                            async
                    
                        
                    
                        - 
                                            
xml_text - 
                                            
callback 
Parameters:
- 
                                            
xml_textString- the xml string to parse.
 
 - 
                                            
callbackFunction 
            The NodeOPCUA API