我照着下面的文章做竟然不对.rn http://www.lihuasoft.net/article/show.asp?id=196rn rn装载XML文档 rn新建一个VB Standard EXE工程项目。在Form1中添加一个CommandButton控件，将其Name和Caption属性分别设为cmdLoad和Load XML。为了使用msxml解析器，必须事先设置工程项目对msxml.dll的引用。选择Project菜单的 References命令，选中Microsoft XML, version 2.0或更高版本。将下列代<em>码</em>加入 cmdLoad_Click事件： rnOption Explicit rnDim xml As DOMDocument rnPrivate Sub cmdLoad_Click() rnSet xml = New DOMDocument rnCall xml.Load(App.Path ＆ “flight.xml") 这一句不对，我改成了rndim rt as Longrnrt=xml.Load("d:\web.xml") '用绝对路径比较可靠rn' flight.xml为描述航班信息的XML文档 rnEnd Sub rn rn运行该程序，点击Load XML按钮即可装载XML文档。载入的XML文档包含一个按照树状结构排列的节点对象集合，顶层节点或根节点是 documentElement。每个节点都有一组属性和方法，每个节点可以包含一个或多个子节点，当然也可以不包含任何节点。必须先取得对根节点的引用才能操纵XML文档。在 cmdLoad_Click事件代<em>码</em>后添加下列代<em>码</em>： rn rnDim root As IXMLDOMElement rnSet root = xml.documentElement rn rn遍历节点集合 rn可以使用Visual Basic的For Each...Next循环结构在节点对象集合中循环。在cmdLoad_Click事件代<em>码</em>后添加下列代<em>码</em>： rnDim node As IXMLDOMNode rnFor Each node In root.childNodes rnDebug.Print node.Text rnNext rn一运行后在 rt=xml.Load("d:\web.xml") '用绝对路径比较可靠rn返回值是-1,我用的是Microsoft XML Version 2.0 ,又改为Microsoft XML v5.0也不行。
rnCode 128 is a high-density linear symbology that encodes text, numbers, numerous functions and the entire 128 ASCII character set (from ASCII 0 to ASCII 128.) It is commonly used for several implementations; and is also referred to as ISBT-128, GS1-128, UCC-128, EAN-128 and USS Code 128. rnrnCode 128 contains 106 different printed barcode patterns. Each printed barcode may have one of three different meanings depending upon which of the character sets are being used, with the availability of three different Code 128 start characters to program the initial character set. Functions are also provided in the barcode symbology to switch between character sets and encode Application Identifiers. Code 128 may be complex to use because of the different character sets, which is the primary reason IDAutomation provides the Code 128 auto function, "Code128( )", in several of their Font Tools, Components and Applications.rnrnThe complete Code 128 barcode consists of a start character, data digits, a modulo 103 check digit and a stop character.rnrnStart Character Data Digits Check Character Stop Character rn?/b> CODE-128 O ?/b> rn rnrnThe above symbol was created with the IDAutomation Image Generator.rnrnVarious Standards for the Code 128 Symbology rn rnrnSeveral standards exist that dictate how Code 128 barcodes should be generated for certain implementations; a few of these include:rnrnGS1-128 (previously known as UCC-128 and EAN-128) is used to create several types of barcode symbols that include Application Identifiers. Application Identifiers (AIs) define the purpose of the data in the symbol and how it is to be used. rnISBT-128 is specifically designed for the purpose of printing blood product labels. It was developed by the International Society of Blood Transfusion (ISBT) and the Working Party on Automation and Data Processing (WPADP). rnUSS Code 128 (Uniform Symbology Specification Code 128) is the published specification for Code 128. rnISS Code 128 (International Symbology Specification Code 128) is the USS Code 128 symbology with a new feature that allows the encoding of extended ASCII characters for non-English languages. rnThe Global Trade Item Number (GTIN), or previously known as EAN14, is the product identification structure in the GS1 (EAN/UCC) system. The GTIN is a 14 digit fixed length numeric string, including the indicator digit (or logistic variant), the EAN/UCC company prefix, item reference and check digit. When using the EAN128 symbology, the data will need to be appended with the Fnc1 character and an Application Identifier of 01. The GTIN should always be stored in databases as a 14-digit number. When the GTIN is represented in UPC-A, UPC-E, GTIN-8 and GTIN-13, as 8, 12, or 13 digits, it should be stored as a 14-digit number by appending zeros to the beginning of the data. rnProducts for Printing Code 128 rn rnrnSeveral Barcode Integration Guides are available that suggest one or more barcode printing options. These integration options should be examined to determine whether to use barcode components, applications or fonts for the printing of barcodes. A few of the Barcode Integration Guides offered include the following:rnrnAccess rnCrystal Reports rnExcel rnFileMaker rnOpen Office & Star Office rnOracle Reports rnReporting Services rnC++ rnC# .NET rnVisual Basic 6 and VB.NET rnWeb Barcode Implementation rnFeatured Product:rnrnIDAutomation's Universal Barcode Font Advantage Package is a unique product that excels at generating Code-128 barcodes on multiple operating systems and locales, including Double Byte versions of Windows. This package overcomes the obstacles that sometimes occur when printing Code 128 as a barcode font outside of the Unites States.rnrnReading & Scanning Code 128 Barcodesrn rnrnThe most common method of reading barcodes is with a barcode scanner. Most of the barcode scanners recommended by IDAutomation perform keyboard emulation and receive power from the USB port, so that no external power supply is required. When a barcode is scanned using keyboard emulation, the data scanned appears at the cursor as if it had been typed in from the keyboard.rnrnMost barcode scanners have the ability to read Code 128 barcodes by default, such as the IDAutomation SC5 USB CCD Scanner. This scanner dependably reads IDAutomation抯 Code 128 Font and Universal Barcode Font when printed as small as 6 points, which is an X dimension of 4 mils.rnCreating GS1-128 (UCC/EAN 128) Compliant Barcodes rnrnNotice: GS1 recently renamed several barcode standards built on Code 128 such as EAN-128 and UCC-128 to GS1-128. The name change does not change the barcode standards, therefore documentation referring to EAN-128 and UCC-128 is the same as GS1-128. GS1 also recently renamed the RSS Symbology to GS1 DataBar to avoid confusion with RSS feed technology.rnrnThe Code 128 symbology is used to create GS1-128 (formerly UCC128 or EAN128) barcodes such as the GS1-128 symbols and data structure for SSCC18 and SCC14. When using Code 128 to create GS1-128, every barcode must begin with a Start C character followed by a (FNC1) "function code one" and an Application Identifier (AI) number directly after each FNC1. Additional FNC1 codes may be applied to a barcode to encode additional information. Below are some of the requirements for GS1-128 and how to use them.rnrnSymbol Size:rnAccording to GS1-128 specifications, the height of the bar code should be 15% of the length or 0.50 inch (1.3 CM), whichever is greater. The X dimension may range from 10 mils (.025 cm) to 40 mils (.1 cm). When the X dimension used is between 10 and 16 mils, the symbol should be 0.50" tall. When the X dimension used is between 16 and 40 mils, the symbol should be 1.25" tall. The X dimension of 10 mils (0.10") is recommended for use with most hand-held scanners. IDAutomation's Code 128 Font IDAutomationC128M and Universal Font IDAutomation Uni M are specifically designed for this purpose. They are exactly 0.50" tall with an X dimension of 10 mils when printed at 12 points. rnGS1 FNC1 and the Application Identifier (AI):rnThe Application Identifier (AI) defines the barcode data fields in the GS1-128 barcode. Each AI uniquely identifies the meaning and format of the data following it. The AI has parentheses around it in the human readable form of the information. However, the parentheses are not encoded in the barcode. rnIn some situations, the parentheses may not appear in the text portion of the barcode. If the ASCII 202 character is included in the Code 128 Auto function and the parentheses are not around the correct number of digits for the AI or do not exist, the FNC1 is still encoded in the barcode and the barcode is accurate except for the human readable representation. To make the human-readable digits accurate as well, enter the following extended ASCII character as the FNC1 for the correct number of digits in the AI with the ApplyTilde property enabled:rn~212 = 2 digits ~213 = 3 digits ~214 = 4 digitsrn~215 = 5 digits ~216 = 6 digits ~ 217 = 7 digitsrnFor example, to encode 77(1234)0128, the data of 77~21412340128 would be used. rnA few examples of encoding GS1-128 (UCC-128 or EAN-128) barcodes using IDAutomation products are included in Fig 1. rnFNC2:rnThe FNC2 character may be inserted as ASCII 197 in IDAutomation's products, for example: ~19780-128-4991 encodes [FNC2]80-128-4991. IDAutomation抯 SC5USB Scanner may be programmed to hold the barcode starting with the FNC2 in memory and only transmit data after scanning a second barcode, which allows a continuous text string to be encoded in two barcodes.