1//============================================================================== 2// 3// TOBESOFT Co., Ltd. 4// Copyright 2017 TOBESOFT Co., Ltd. 5// All Rights Reserved. 6// 7// NOTICE: TOBESOFT permits you to use, modify, and distribute this file 8// in accordance with the terms of the license agreement accompanying it. 9// 10// Readme URL: http://www.nexacro.co.kr/legal/nexacro17-public-license-readme-1.1.html 11// 12//============================================================================== 13 14 15if (!nexacro.DomParser) { 16 nexacro.DomParseErrorEventInfo = function (obj, id, level, line, column, message, description) { 17 this.id = this.eventid = id || "onerror"; 18 this.fromobject = this.fromreferenceobject = obj; 19 20 this.level = level; 21 this.line = line; 22 this.column = column; 23 this.message = message; 24 this.description = description; 25 }; 26 var _pDomParseErrorEventInfo = nexacro._createPrototype(nexacro.Event, nexacro.DomParseErrorEventInfo); 27 nexacro.DomParseErrorEventInfo.prototype = _pDomParseErrorEventInfo; 28 29 _pDomParseErrorEventInfo._type_name = "DomParseErrorEventInfo"; 30 31 delete _pDomParseErrorEventInfo; 32 33 nexacro.DomParser = function (id, parent) { 34 nexacro._EventSinkObject.call(this, id, parent); 35 }; 36 37 var _pDomParser = nexacro._createPrototype(nexacro._EventSinkObject, nexacro.DomParser); 38 nexacro.DomParser.prototype = _pDomParser; 39 40 _pDomParser._type_name = "DomParser"; 41 _pDomParser._event_list = { 42 "onerror" : 1 43 }; 44 45 _pDomParser.parseFromString = function (strText, strMineType) { 46 if (!strMineType || strMineType == "text/xml") { 47 var xmlDoc = nexacro._parseXMLDocument(strText); 48 if (xmlDoc) { 49 var error = nexacro._getParserError(xmlDoc); 50 if (error) { 51 this.on_fire_onparseerror("error", error.line, error.column, error.message, error.desc); 52 return null; 53 } 54 } 55 56 return xmlDoc; 57 } 58 59 return null; 60 }; 61 62 _pDomParser.on_fire_onparseerror = function (level, line, column, message, description) { 63 if (this.onerror && this.onerror._has_handlers) { 64 var evt = new nexacro.DomParseErrorEventInfo(this, "onerror", level, line, column, message, description); 65 return this.onerror._fireEvent(this, evt); 66 } 67 return false; 68 }; 69 70 delete _pDomParser; 71 72 nexacro.XmlSerializer = function (id, parent) { 73 this.id = this.name = id; 74 this.parent = parent; 75 }; 76 77 var _pXmlSerializer = nexacro._createPrototype(nexacro.Object, nexacro.XmlSerializer); 78 nexacro.XmlSerializer.prototype = _pXmlSerializer; 79 80 _pXmlSerializer.serializeToString = function (xmldoc) { 81 return nexacro._documentToXml(xmldoc);
82 }; 83 84 delete _pXmlSerializer; 85} 86 87 88 89
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.