From 5c4419bcbd79df70ebc9b8a9c243099984bb0bcf Mon Sep 17 00:00:00 2001 From: Willem Cazander Date: Sun, 9 Mar 2014 14:29:12 +0100 Subject: [PATCH] Copyed some strings from java xmlconstants. --- .../main/java/org/x4o/xml/io/XMLConstants.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/x4o-driver/src/main/java/org/x4o/xml/io/XMLConstants.java b/x4o-driver/src/main/java/org/x4o/xml/io/XMLConstants.java index 7b8ce21..4ee5558 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/io/XMLConstants.java +++ b/x4o-driver/src/main/java/org/x4o/xml/io/XMLConstants.java @@ -29,11 +29,11 @@ package org.x4o.xml.io; * @version 1.0 Mrt 31, 2012 */ public final class XMLConstants { - + /** * Lowcase xml. */ - public static final String XML = "xml"; + public static final String XML = javax.xml.XMLConstants.XML_NS_PREFIX; // "xml" /** * XML Default encoding is utf-8. @@ -48,7 +48,7 @@ public final class XMLConstants { /** * XML Namespace prefix attribute. */ - public static final String XMLNS_ATTRIBUTE = "xmlns"; + public static final String XMLNS_ATTRIBUTE = javax.xml.XMLConstants.XMLNS_ATTRIBUTE; // "xmlns" /** * XML Namespace prefix seperator @@ -58,18 +58,18 @@ public final class XMLConstants { /** * XML Schema namespace URI. */ - public static final String XML_SCHEMA_NS_URI = "http://www.w3.org/2001/XMLSchema"; + public static final String XML_SCHEMA_NS_URI = javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI; // "http://www.w3.org/2001/XMLSchema" /** * XML Schema instance namespace URI. */ - public static final String XML_SCHEMA_INSTANCE_NS_URI = "http://www.w3.org/2001/XMLSchema-instance"; + public static final String XML_SCHEMA_INSTANCE_NS_URI = javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI; // "http://www.w3.org/2001/XMLSchema-instance" /** * Null or empty namespace uri. * @see Namespaces in XML, 5.2 Namespace Defaulting */ - public static final String NULL_NS_URI = ""; + public static final String NULL_NS_URI = javax.xml.XMLConstants.NULL_NS_URI; // "" /** * (Start) Definition of DTD doctype. @@ -246,7 +246,7 @@ public final class XMLConstants { // &#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' //} - static private boolean escapeXMLValue(char c,StringBuffer result) { + static private boolean escapeXMLValue(char c,StringBuilder result) { if (c=='<') { result.append("<"); return true; @@ -291,7 +291,7 @@ public final class XMLConstants { // Reference ::= EntityRef | CharRef // AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" int length = value.length(); - StringBuffer result = new StringBuffer(length); + StringBuilder result = new StringBuilder(length); for (int i=0;i