CVS Update: xmlpull-api-v1/addons/java/wrapper/src/org/xmlpull/v1/wrapper/classic
Aleksander Andrzej Slominski <[email protected]> Sat, 3 May 2003 17:48:22 -0500 (EST)
| Newsgroups | gmane.text.xml.xmlpull.devel |
|---|---|
| Message-ID | <[email protected]> |
aslom 03/05/03 17:48:22
Modified: addons/java/wrapper/src/org/xmlpull/v1/wrapper
XmlSerializerWrapper.java
addons/java/wrapper/src/org/xmlpull/v1/wrapper/classic
StaticXmlSerializerWrapper.java
Log:
more precise name for current serialization namespace used to write start/end tags and simple text elements
Revision Changes Path
1.3 +9 -3 xmlpull-api-v1/addons/java/wrapper/src/org/xmlpull/v1/wrapper/XmlSerializerWrapper.java
Index: XmlSerializerWrapper.java
===================================================================
RCS file: /l/extreme/cvspub/xmlpull-api-v1/addons/java/wrapper/src/org/xmlpull/v1/wrapper/XmlSerializerWrapper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -t -w -r1.2 -r1.3
--- XmlSerializerWrapper.java 3 May 2003 22:23:12 -0000 1.2
+++ XmlSerializerWrapper.java 3 May 2003 22:48:22 -0000 1.3
@@ -16,22 +16,28 @@
public interface XmlSerializerWrapper extends XmlSerializer {
public static final String XSI_NS = "http://www.w3.org/2001/XMLSchema-instance";
- public String getDefaultNamespace();
- public void setDefaultNamespace(String value);
+ public String getCurrentNamespace();
+ public void setCurrentNamespace(String value);
+ /** Write start tag in current namespace with name given as argument. */
public XmlSerializer startTag (String name)
throws IOException, IllegalArgumentException, IllegalStateException;
+ /** Write end tag in current namespace with name given as argument. */
public XmlSerializer endTag (String name)
throws IOException, IllegalArgumentException, IllegalStateException;
/**
- * Writes a simple element such as <username>johndoe</username>. The namespace
+ * Writes a simple element such as <username>johndoe</username>. The namespace
* and elementText are allowed to be null. If elementText is null, an xsi:nil="true"
* will be added as an attribute.
*/
public void element(String namespace, String elementName, String elementText)
+ throws IOException, XmlPullParserException;
+
+ /** Write simple text element in current namespace */
+ public void element(String elementName, String elementText)
throws IOException, XmlPullParserException;
}
1.3 +12 -5 xmlpull-api-v1/addons/java/wrapper/src/org/xmlpull/v1/wrapper/classic/StaticXmlSerializerWrapper.java
Index: StaticXmlSerializerWrapper.java
===================================================================
RCS file: /l/extreme/cvspub/xmlpull-api-v1/addons/java/wrapper/src/org/xmlpull/v1/wrapper/classic/StaticXmlSerializerWrapper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -t -w -r1.2 -r1.3
--- StaticXmlSerializerWrapper.java 3 May 2003 22:23:13 -0000 1.2
+++ StaticXmlSerializerWrapper.java 3 May 2003 22:48:22 -0000 1.3
@@ -19,26 +19,33 @@
public class StaticXmlSerializerWrapper extends XmlSerializerDelegate
implements XmlSerializerWrapper
{
- protected String defaultNs;
+ protected String currentNs;
public StaticXmlSerializerWrapper(XmlSerializer xs) {
super(xs);
}
- public String getDefaultNamespace() { return defaultNs; }
- public void setDefaultNamespace(String value) { defaultNs = value; }
+ public String getCurrentNamespace() { return currentNs; }
+ public void setCurrentNamespace(String value) { currentNs = value; }
public XmlSerializer startTag (String name)
throws IOException, IllegalArgumentException, IllegalStateException
{
- return xs.startTag(defaultNs, name);
+ return xs.startTag(currentNs, name);
}
public XmlSerializer endTag (String name)
throws IOException, IllegalArgumentException, IllegalStateException
{
- return xs.endTag(defaultNs, name);
+ return xs.endTag(currentNs, name);
+ }
+
+ /** Write simple text element in current namespace */
+ public void element(String elementName, String elementText)
+ throws IOException, XmlPullParserException
+ {
+ element(currentNs, elementName, elementText);
}
public void element(String namespace, String elementName, String elementText)
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/O10svD/Me7FAA/uetFAA/2U_rlB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
[email protected]
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/