* @param dom The DOM tree to write
* @return A string containing the XML in character form.
*/
- public static String serialize(Node dom) {
+ public static String jaxpSerialize(Node dom) {
String ret = null;
TransformerFactory factory = TransformerFactory.newInstance();
* @exception java.io.IOException Raised if an I/O problem is detected
* @exception SAMLException Raised if the object is incompletely defined
*/
- public static String serializeC14N(Node root){
+ public static String serialize(Node root){
byte[] bs = null;
try
{
InputStream inStream = new FileInputStream("data/arp.site.xml");
parser.parse(new InputSource(inStream));
- String directXML = Parser.serializeC14N(parser.getDocument().getDocumentElement());
+ String directXML = Parser.serialize(parser.getDocument().getDocumentElement());
- String processedXML = Parser.serializeC14N(siteArp.unmarshall());
+ String processedXML = Parser.serialize(siteArp.unmarshall());
assertTrue(
"File-based ARP Repository did not return the correct site ARP.",
inStream = new FileInputStream("data/arp.user.test.xml");
parser.parse(new InputSource(inStream));
- directXML = Parser.serializeC14N(parser.getDocument().getDocumentElement());
+ directXML = Parser.serialize(parser.getDocument().getDocumentElement());
- processedXML = Parser.serializeC14N(userArp.unmarshall());
+ processedXML = Parser.serialize(userArp.unmarshall());
assertTrue(
"File-based ARP Repository did not return the correct user ARP.",
InputStream inStream = new FileInputStream(arpExamples[i]);
parser.parse(new InputSource(inStream));
- String directXML = Parser.serializeC14N(parser.getDocument().getDocumentElement());
+ String directXML = Parser.serialize(parser.getDocument().getDocumentElement());
Arp arp1 = new Arp();
arp1.marshall(parser.getDocument().getDocumentElement());
- String processedXML = Parser.serializeC14N(arp1.unmarshall());
+ String processedXML = Parser.serialize(arp1.unmarshall());
assertTrue(
"Round trip marshall/unmarshall failed for file (" + arpExamples[i] + ")",