WebLOAD provides an embedded, third-party XML parser object to improve the multi-platform support for XML parsing within the WebLOAD environment. The XML parser object can be used instead of MSXML and Java XML parsing, resulting in lower memory consumption and increased performance during load testing.

The XML parser object can be used to reference any element in an XML document. For example, you can use the XML parser object to generate an Excel file containing the desired details of a specified element. 

WebLOAD uses the Open Source Xerces XML parser (see http://xml.apache.org/xerces-c/).

The XML parser object is instanced as follows:

xmlObject = new XMLParserObject();

The parse() method, not exposed by the original XML parser, is exposed by WebLOAD. This method is identical to the parseURI() method, except that it receives an XML string instead of a URI.

The following sections provide lists of exposed methods and properties as well as a detailed example of the implementation of the XML parser object.

Example

The following is an example of the use of the XML parser object:

//Create the XML parser object (xerces-c parser)
xmlObject = new XMLParserObject();


//Parse the xml file from the specified path
xmlDoc = xmlObject.parseURI("C:\\xml_file.xml");


//Retrieve the first node with the “NODE5” tag
domNode = xmlDoc.getElementsByTagName("NODE5").item(0);


//Retrieve the node's type
nodeType = domNode.getNodeType();


//Retrieve the node's parent
nodeParent = domNode.getParentNode().getNodeName();


//Retrieve the number of child nodes
numOfChilds = domNode.getChildNodes().getLength();


//Create a new element
newNode1 = xmlDoc.createElement("NEW_NODE1");


//Insert the new element into DOM
domNode1.insertBefore(newNode1, domNode);

WebLoad XML-parser methods的更多相关文章

  1. (转载)XML Tutorial for iOS: How To Choose The Best XML Parser for Your iPhone Project

    There are a lot of options when it comes to parsing XML on the iPhone. The iPhone SDK comes with two ...

  2. 【Java规划】DOM XML Parser分解、遍历、创XML

    1.前言 DOM XML Parser简介 DOM 它是 W3C 处理 XML 规范 API,这是很多其他的 XML 地基处理相关标准,不仅是 Java,其他的,如 Javascript,PHP.MS ...

  3. PHP XML Parser

    安装 XML Parser 函数是 PHP 核心的组成部分.无需安装即可使用这些函数. PHP XML Parser 函数 PHP:指示支持该函数的最早的 PHP 版本. 函数 描述 PHP utf8 ...

  4. 雷林鹏分享:XML Parser

    XML Parser 所有现代浏览器都有内建的 XML 解析器. XML 解析器把 XML 文档转换为 XML DOM 对象 - 可通过 JavaScript 操作的对象. 解析 XML 文档 下面的 ...

  5. HTTP 响应实体主体:XML 及 XML parser

    本文内容 HTTP 响应实体主体:XML XML parser 总结 各编程语言实现的 XML parser   HTTP 响应实体主体:XML 实体主体(entity-body)通常是HTTP响应里 ...

  6. PHP的XML Parser(转)

    PHP处理XML文件 一.读取,更新(创建或者操作)一个XML文档,需要XML解析器 .有两种XML parsers: 1. Tree-based parser:将XML文档转化为DOM Tree结构 ...

  7. PHP XML Parser函数

    PHP XML Parser 函数 PHP XML Parser 简介 XML 函数允许您解析 XML 文档,但无法对其进行验证. XML 是一种用于标准结构化文档交换的数据格式.您可以在我们的 XM ...

  8. PHP XML Parser 函数

    PHP XML Parser 简介 XML 函数允许您解析 XML 文档,但无法对其进行验证. XML 是一种用于标准结构化文档交换的数据格式.您可以在我们的 XML 教程 中找到更多有关 XML 的 ...

  9. XML Parser Errors See Details for more Information XML Parser Error on line 1: Document root ele

    1.错误描写叙述 XML Parser Errors See Details for more Information XML Parser Error on line 1: Document roo ...

  10. VLC 可能的 XML parser error 解决

    由于 VLC 设置不当 (通常是动了 skin 选项……),再次加载时 VLC 不能正常启动,并报如下错误: [00007f7dd003b670] xml xml reader error: XML ...

随机推荐

  1. JQ中的问题

    $(function(){$(document).bind("click", function (e) {$(e.target).closest("p").cs ...

  2. WebService学习之旅(二)JAX-WS基于Web容器发布WebService

    在上节中我们定义Web服务接口和实现类后,调用Endpoint类的静态方法publish发布来webservice,这种方法使用起来虽然简单,但是对于一个企业级应用来说通常对外提供的服务可能不止一个, ...

  3. android 日期 时间

    /** * 给定一个日期型字符串,返回加减n天后的日期型字符串 * * @param basicDate * @param nDays * @return */ public static Strin ...

  4. Git常用命令的使用方法

    推荐一个比较好的GIT的教学地址,廖雪峰老师的git教程! 这里简述Git常用命令的使用方法: 一.初始化git 右键进入 Git Bash 1.建立身份信息 git config --global ...

  5. 解决 FusionCharts3.2.1 首页无法载入的问题

    在实际项目中测试FusionCharts3.2.1时,发现首次载入无法正常载入,第二次载入就恢复正常!   原因:FusionCharts ID与变量名重复   以下是正常写法: var member ...

  6. C++拾遗(四)——顺序容器

    之前一篇博文(<初窥标准库>)简单了解了一种最常用的顺序容器:vector类型.本文将对该文内容进行进一步的学习和完善,继续讨论标准库提供的顺序容器类型.所谓顺序容器,即将单一类型的元素聚 ...

  7. UVA 11400 Lighting System Design 照明系统设计

    首先是一个贪心,一种灯泡要么全都换,要么全都不换. 先排序,定义状态d[i]为前面i种灯泡的最小花费,状态转移就是从d[j],j<i,加上 i前面的j+1到i-1种灯泡换成i的花费. 下标排序玩 ...

  8. 字符串赋值方式理解 sizeof 和strlen的一些区别

    #include<stdio.h>#include<string.h>  int main(){ int a,i=0; char ch[10000]; while(scanf( ...

  9. 数据倾斜是多么痛?spark作业调优秘籍

    目录视图 摘要视图 订阅 [观点]物联网与大数据将助推工业应用的崛起,你认同么?      CSDN日报20170703——<从高考到程序员——我一直在寻找答案>      [直播]探究L ...

  10. linux下使用OpenCV的一些问题

    完整正确的代码如下: import cv2 import numpy as np image = cv2.imread('Pictures/a.png') cv2.imshow('original_i ...