[jdom-interest] Re: jdom-interest digest, Vol 1 #1298 - 10 msgs

salil khanwalkar k_salil at yahoo.com
Tue Aug 26 00:27:55 PDT 2003


Hi,
I am trying to create the following-
<dataSet>
 <user username="user123" password="xxxxxx1" /> 
</dataSet>
This is my code--
 Element root = new Element("DataSet");
        Document doc = new Document(root);
        Element user = new Element("username");
        Element passwd = new Element("password");
        //Element passwd = new Element("password").setText(str1);
        Attribute userattr = new Attribute(uattr,str);
        Attribute passwdattr = new Attribute(pattr,str1);
        //Element user = new Element("username").setAttribute(str);
        try{        
            user.setAttribute(str);        
            passwd.setAttribute(str1);
            root.addContent(user);
            root.addContent(passwd);
        } catch(IllegalAddException i) {
            System.out.println(i);
        }
The element attributes will be read from a file. They are not to be created.
But this code is not working.
Can anybody tell me how to create the above.

jdom-interest-request at jdom.org wrote:
Send jdom-interest mailing list submissions to
jdom-interest at jdom.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.denveronline.net/mailman/listinfo/jdom-interest
or, via email, send a message with subject or body 'help' to
jdom-interest-request at jdom.org

You can reach the person managing the list at
jdom-interest-admin at jdom.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of jdom-interest digest..."


Today's Topics:

1. Jennifer Bailey/BBH is out of the office. (Jennifer.Bailey at bbh.com)
2. Error messages regarding jdom.jar (Koller, Shmuel)
3. JDOMException.initCause is broken. (Russell Black)
4. [ann] TestMaker 4.0.4 now available (Frank Cohen)
5. DOCTYPE Error (Arvind Ramankole)
6. JDOMException.initCause is broken (Russell Black)
7. Enhance performance by generating jar file with -0 option (Wolfgang Hoschek)
8. Re: Enhance performance by generating jar file with
-0 option (Jason Hunter)
9. Line numbers (Paul Cantrell)

--__--__--

Message: 1
From: Jennifer.Bailey at bbh.com
To: jdom-interest at jdom.org
Date: Mon, 25 Aug 2003 02:40:23 -0400
Subject: [jdom-interest] Jennifer Bailey/BBH is out of the office.

I will be out of the office starting 08/25/2003 and will not return until 09/08/2003.

If you need immediate assistance, please call Karen Mui (6218) or Judy Gao (6740). Otherwise,I will respond to your email on my return.


Thanks

Jennifer Bailey


--__--__--

Message: 2
From: "Koller, Shmuel" 
To: jdom-interest at jdom.org
Date: Mon, 25 Aug 2003 02:48:19 -0500
Subject: [jdom-interest] Error messages regarding jdom.jar

I placed jdom.jar which is downloaded as jdom-b9\build\jdom.jar
in appropriate /lib for run time class resoltion, but get these messages
during jboss-tomcat startup, thanks for any help, Shmuel Koller

2003-08-25 10:43:39,567 INFO [main] org.jboss.web.localhost.Engine -
StandardWrapper[/EssConfig:invoker]: Loading container servlet invoker
2003-08-25 10:43:39,583 INFO [main] org.jboss.deployment.MainDeployer -
Deployed package:
file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/server
/ess/deploy/ess-middleware.ear
2003-08-25 10:43:39,592 ERROR [main]
org.jboss.deployment.scanner.URLDeploymentScanner - MBeanException:
Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
[org.jboss.deployment.DeploymentInfo at 14f7e54a {
url=file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/se
rver/ess/lib/jdom.jar }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch:
file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/server
/ess/lib/jdom.jar
lastDeployed: 1061797394562
lastModified: 1061797363000
mbeans:
]Incompletely deployed packages:
[org.jboss.deployment.DeploymentInfo at 14f7e54a {
url=file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/se
rver/ess/lib/jdom.jar }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch:
file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/server
/ess/lib/jdom.jar
lastDeployed: 1061797394562
lastModified: 1061797363000
mbeans:
, org.jboss.deployment.DeploymentInfo at 14f7e54a {
url=file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/se
rver/ess/lib/jdom.jar }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch:
file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/server
/ess/lib/jdom.jar
lastDeployed: 1061797394562
lastModified: 1061797363000
mbeans:
, org.jboss.deployment.DeploymentInfo at 14f7e54a {
url=file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/se
rver/ess/lib/jdom.jar }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch:
file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/server
/ess/lib/jdom.jar
lastDeployed: 1061797394562
lastModified: 1061797363000
mbeans:
, org.jboss.deployment.DeploymentInfo at 14f7e54a {
url=file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/se
rver/ess/lib/jdom.jar }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch:
file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/server
/ess/lib/jdom.jar
lastDeployed: 1061797394562
lastModified: 1061797363000
mbeans:
, org.jboss.deployment.DeploymentInfo at 14f7e54a {
url=file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/se
rver/ess/lib/jdom.jar }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch:
file:/home/spml/CTSA_Home/WebCon_Middleware/jboss-3.0.4_tomcat-4.1.12/server
/ess/lib/jdom.jar
lastDeployed: 1061797394562
lastModified: 1061797363000
mbeans:
]MBeans waiting for classes:

MBeans waiting for other MBeans:


--__--__--

Message: 3
From: "Russell Black" 
To: 
Date: Mon, 25 Aug 2003 11:59:24 -0600
Subject: [jdom-interest] JDOMException.initCause is broken.

This is a multi-part message in MIME format.

------=_NextPart_000_026C_01C36B00.53D33AF0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

initCause should return "this", not the cause. See the JDK docs. 

Russell Black
iArchives Development


------=_NextPart_000_026C_01C36B00.53D33AF0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">







namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"PersonName"/>


st1\:*{behavior:url(#default#ieooui) }



 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
	{margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:windowtext;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->




style=3D'tab-interval:.5in'>




size=3D2
face=3DArial>style=3D'font-size:10.0pt;font-family:Arial'>initCausen>size=3D2 face=3DArial>style=3D'font-size:10.0pt;font-family:Arial'> should
return “this”, not the cause.style=3D'mso-spacerun:yes'>  
See the JDK docs.  =




style=3D'font-size:10.0pt;
font-family:Arial'> 



Roman"> style=3D'font-size:12.0pt;mso-no-proof:yes'>Russell =
Blackstyle=3D'mso-no-proof:yes'>



style=3D'font-size:
12.0pt;mso-no-proof:yes'>iArchives =
Development



style=3D'font-size:
12.0pt'> 









------=_NextPart_000_026C_01C36B00.53D33AF0--


--__--__--

Message: 4
Date: Mon, 25 Aug 2003 15:40:56 -0700
From: Frank Cohen 
To: jdom-interest at jdom.org
Subject: [jdom-interest] [ann] TestMaker 4.0.4 now available

TestMaker 4.0.4 is now available for free download at the 
PushToTest.com Web site. The new software includes the following new 
features:

- A quick access panel to start the script Recorder, search for text in 
a test agent script, and create a new test agent.

- A new system variable that enables test agent scripts to drive the 
TestMaker utility. For example, to programmatically clear the contents 
of the output window.

- TestMaker now includes a fully functional client to state tests on 
TestNetwork. TestNetwork is a commercial product that provides a 
distributed test environment to run TestMaker test agents.

TestMaker is an open-source test tool that software developers, QA 
technicians and IT managers use to check Web-enabled applications for 
scalability, performance and functionality. TestMaker comes with JDOM 
bundled-in.

Thanks for helping me get the word out about the new version of 
TestMaker.

-Frank

---
Frank Cohen, Founder, http://www.PushToTest.com, phone: 408 374 7426 USA

PushToTest offers free open-source test software and global service 
solutions that test, monitor and automate Web Service systems for 
functionality, scalability and performance.


--__--__--

Message: 5
From: Arvind Ramankole 
To: "'jdom-interest at jdom.org'" 
Date: Mon, 25 Aug 2003 15:40:45 -0400
Subject: [jdom-interest] DOCTYPE Error


Hi All,
I am new to jdom and using SAXBuilder, I am getting following
error.
org.jdom.JDOMException: Error on line 1 of document
http://www.mysite.org/xml/StockReport.dtd: The
markup declarations contained or pointed to by the document type
declaration must be well-formed.

When I include the DTD inside the XML file it works fine with out any
errors. It also works when I take out the DOCTYPE from the xml file.

please advice.

Arvind


XML file----




NPAMSHOL
28


NPATCT100WL
44




DTD file---




]>

--__--__--

Message: 6
From: "Russell Black" 
To: 
Date: Mon, 25 Aug 2003 11:50:37 -0600
Subject: [jdom-interest] JDOMException.initCause is broken

This is a multi-part message in MIME format.

------=_NextPart_000_025B_01C36AFF.19BD58B0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

initCause should return "this", not the cause. See the JDK docs. 

Russell Black
iArchives Development


------=_NextPart_000_025B_01C36AFF.19BD58B0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">







namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"PersonName"/>


st1\:*{behavior:url(#default#ieooui) }



 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
	{margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:windowtext;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->




style=3D'tab-interval:.5in'>




size=3D2
face=3DArial>style=3D'font-size:10.0pt;font-family:Arial'>initCausen>size=3D2 face=3DArial>style=3D'font-size:10.0pt;font-family:Arial'> should return
“this”, not the cause.style=3D'mso-spacerun:yes'>  style=3D'mso-spacerun:yes'> See the JDK docs.style=3D'mso-spacerun:yes'>  



style=3D'font-size:10.0pt;
font-family:Arial'> 



Roman"> style=3D'font-size:12.0pt;mso-no-proof:yes'>Russell =
Blackstyle=3D'mso-no-proof:yes'>



style=3D'font-size:
12.0pt;mso-no-proof:yes'>iArchives =
Development



style=3D'font-size:
12.0pt'> 









------=_NextPart_000_025B_01C36AFF.19BD58B0--


--__--__--

Message: 7
Date: Tue, 19 Aug 2003 15:37:42 -0700
From: Wolfgang Hoschek 
Cc: Wolfgang Hoschek 
Subject: [jdom-interest] Enhance performance by generating jar file with -0 option

Would you consider generating jar files with the -0 option to store 
files in the jar file without using ZIP compression?

Although this typically doubles the jar file size, it increases class 
loading performance (except when used in applets which are presumably 
not that important here). For example the JDK rt.jar is produced that way.

Compatibility: The -0 option was introduced in JDK 1.2

Also see http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/jar.html

Thanks.
Wolfgang.


--__--__--

Message: 8
Date: Mon, 25 Aug 2003 17:15:27 -0700
From: Jason Hunter 
To: "jdom-interest at jdom.org" 
Cc: Wolfgang Hoschek 
Subject: Re: [jdom-interest] Enhance performance by generating jar file with
-0 option

What are the numbers behind seeing a performance increase? On a machine 
where the disk is slow but the CPU is fast I can imagine it would be 
better to read compressed content. Also, in the days of fast CPUs how 
much performance does it take to uncompress the classes in a 150K file?

-jh-

Wolfgang Hoschek wrote:

> Would you consider generating jar files with the -0 option to store 
> files in the jar file without using ZIP compression?
> 
> Although this typically doubles the jar file size, it increases class 
> loading performance (except when used in applets which are presumably 
> not that important here). For example the JDK rt.jar is produced that way.
> 
> Compatibility: The -0 option was introduced in JDK 1.2
> 
> Also see http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/jar.html
> 
> Thanks.
> Wolfgang.
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com 
> 
> 


--__--__--

Message: 9
Date: Mon, 25 Aug 2003 19:37:46 -0500
From: Paul Cantrell 
To: jdom-interest at jdom.org
Subject: [jdom-interest] Line numbers

A question that I'm sure you're sick of hearing, but I didn't see it in 
the FAQ:

Is it possible for me to trace a parsed element back to the line number 
on which it appeared in the XML source? Probably this information is 
thrown away before it even gets to JDOM, but if there's any way to get 
at it, it sure would be nice.....

Cheers,

Paul
http://innig.net



--__--__--

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

End of jdom-interest Digest

---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20030826/f63e4056/attachment.htm


More information about the jdom-interest mailing list