Channy

Greenhorn
+ Follow
since Nov 18, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Channy

Hi, Thanks for your reply!

When you say "access to Fixable interface" do you mean by importing the package, or something else?

17 years ago
Hi all,

I need help with a homework question.
I created the following interface:

I'm trying to reference either PowerOn or FixWindow from another class using (although I'm supposed to return a Fixable type..):

I've also tried:

I keep getting the error: "Cannot find symbol: PowerOn()"
I've made sure to add the the package name at the top of the interface file and import all files from the package.. Any Help would be wonderful!!
[ June 19, 2007: Message edited by: geek_azoid ]
17 years ago
Hey just a guess but
<html:select name="produktForm" property="product.name" />
<html options name="frameForm" property="list">PUT VALUE HERE</html ptions>
</html:select>
Also is it options or option. ?
22 years ago
Maybe they opened the file using Netscape, in which case that code would not work.
As far as that code goes I've used it in ie but older versions of netscape cause errors. I don't know if that helps.
I'm having a problem hopefully someone can help me out. I have my xml file:

My problems is that when I unmarshall the xml file, I use :

Which is fine, and gives me all my Links, then I use another for loop to get all my images. What I want to do is print out the objects as they appear in the xml file. Can I have some sort of if next is image, if next is link? Something like that?
Thanks for the help.
You could do it using javax.xml.transform, you can take any xml file and any style sheet and transform it, then I believe output to html, or a file etc.
Not everybody here is a sir that can help you out.
FormatName fn = (FormatName)u.unmarshal(xmlFile);
FormatName tempfn = ObjectFactory.createFormatName();
TransactionCode tc = ObjectFactory.createTransactionCode();
tc.setValue("QG30");
etc.
....
Marshaller m = jc.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE );
m.marshal(tempfn, xmlOutFile);
If you're interested in using java objects created from the xml, and are more comfortable with Java, using JAXB might help you.
http://java.sun.com/xml/jaxb/
I'm working with this code, and don't know if how it's done is the best way.
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
Document XMLDoc = factory.newDocumentBuilder().parse(new URL(xmlFile).openStream());
NodeList linkNames = XMLDoc.getElementsByTagName("urlName");
for (int i=0; i < linkNames.getLength(); i++) {

Node curNode = linkNames.item(i);
NamedNodeMap attrs = curNode.getAttributes();

String currTag = curNode.getNodeName();

if(currTag.equals("urlName"))
urlName.add(i, linkNames.item(i).toString());

}
The xml looks like:
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<link>
<urlName>whats new?</urlName>
<urlPath>getcurrent.jsp?page=whatsnew</urlPath>

<subLink>
<subUrlName>announcements</subUrlName>
<subUrlPath/>
</subLink>

</link>
</menu>
Any help would be great thanks.
Maybe if it's PCDATE it should be written using < >
Sorry if this isn't any help to you.
Thanks for your response.
It's written in using javascript.
But yeah, any code examples using xalan, or any xerces info you have would be great.
Thanks
This is the simple code:
var xml= new ActiveXObject("Microsoft.XMLDOM")
xml.async=false
xml.load("invoice.xml")
var xsl=new ActiveXObject("Microsoft.XMLDOM")
xsl.async=false
xsl.load("invoice.xsl")
document.write(xml.transformNode(xsl))
The problem is that this does not work in Netscape, and I don't know why. There's postings about this everywhere, but no answers, can anyone help?
Also, what is a better way of doing things:
1. Using xml, dtd's and xsl to transform. With microsoft XMLDom or...
2. Use a java parser DOM, in a JSP or servlet.
Hi,
I don't know if this will help you out or not but localhost:8082 isn't an actual address to where the file so it wouldn't work.
You'd have to go: "C:\\whatever\\filename.xml"