Skip to content

Instantly share code, notes, and snippets.

View fgeorges's full-sized avatar

Florent Georges fgeorges

View GitHub Profile
declare function local:add-ns-node(
$elem as element(),
$prefix as xs:string,
$ns-uri as xs:string
) as element()
{
element { QName($ns-uri, concat($prefix, ":x")) }{ $elem }/*
};
local:add-ns-node(<xxx><a/></xxx>, "p1", "uri2")
public class SaxToDom
{
public SaxToDom(XMLReader reader, InputSource input) {
myReader = reader;
myInput = input;
}
public Document makeDom() {
Document doc = null;
try {