![JAR search and dependency download from the Maven repository](/logo.png)
examples.namespace_compensation.FragmentTest.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)
{
// instantiate VTDGen and XMLModifier
VTDGen vg = new VTDGen();
XMLModifier xm = new XMLModifier();
AutoPilot ap = new AutoPilot();
AutoPilot ap2 = new AutoPilot();
ap.selectXPath("(/*/*/*)[position()>1 and position()<4]");
ap2.selectXPath("/*/*/*");
if (vg.parseFile("soap2.xml", true))
{
VTDNav vn = vg.getNav();
xm.bind(vn);
ap2.bind(vn);
ap.bind(vn);
ap2.evalXPath();
ElementFragmentNs ef = vn.getElementFragmentNs();
int i = -1;
while ((i = ap.evalXPath()) != -1)
{
xm.insertAfterElement(ef);
}
xm.output("new_soap.xml");
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy