Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMSourcedElement.removeChildren()


    protected void runTest() throws Throwable {
        OMFactory factory = metaFactory.getOMFactory();
        OMSourcedElement element = factory.createOMElement(new ByteArrayDataSource(
                "<element attr='value'><a/></element>".getBytes("utf-8"), "utf-8"));
        element.removeChildren();
        // Check that the attribute has been added
        Iterator it = element.getAllAttributes();
        assertTrue(it.hasNext());
        OMAttribute attr = (OMAttribute)it.next();
        assertEquals("attr", attr.getLocalName());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.