Combining a stream of multiple XML documents into a single valid document

_ChoaSG30_

New Member
I have the following XML file which I am trying to edit. The file was developed poorly, and as a result, contains multiple namespace declarations and closing root tags throughout the document. Is there anyway to strip these extra namespaces and closing tags and only leave the 1 namespace at the top of the file and 1 closing tag at the bottom?Below is a simplified version of the file:\[code\]<?xml version="1.0" encoding="UTF-8"?><p:demographic xmlns:p="http://crown.esrd.net/crown"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://crown.esrd.net/crown crown.xsd"><patient><lastName>JOHNS</lastName><firstName>JASON</firstName><middleInitial>Y</middleInitial></patient></p:demographic><?xml version="1.0" encoding="UTF-8"?><p:demographic xmlns:p="http://crown.esrd.net/crown"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://crown.esrd.net/crown crown.xsd"><patient><lastName>CALDWELL</lastName><firstName>PENNY</firstName><middleInitial>Y</middleInitial></patient></p:demographic>\[/code\]
 
Back
Top