examples.updateElementName.changeElementName.cs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vtd-xml Show documentation
Show all versions of vtd-xml Show documentation
XimpleWare's VTD-XML is, far and away, the industry's most advanced and powerful XML processing model for SOA and Cloud Computing
using System;
using System.Collections.Generic;
using System.Text;
using com.ximpleware;
using System.IO;
namespace FragmentTest
{
public class FragmentTest
{
public static void Main(String[] args)
{
String xml = " ";
Encoding eg = Encoding.GetEncoding("utf-8");
VTDGen vg = new VTDGen();
vg.setDoc(eg.GetBytes(xml));
vg.parse(false);
VTDNav vn = vg.getNav();
AutoPilot ap = new AutoPilot(vn);
ap.selectXPath("//*");
XMLModifier xm = new XMLModifier(vn);
while (ap.evalXPath() != -1)
{
xm.updateElementName("d:/lalalala");
}
xm.output("lala.xml");
}
}
}