Hi

 

I am using _javascript_ in parsing XML.

<XML id = "testxml"></XML>

<XML id = "testXSL></XML>

tHE ABOVE is in my html.and below in my _javascript_.

testXSL.async=false;
testXSL.load("test.xsl");

VAR=testXML.documentElement.transformNode(testXSL.documentElement);

now i want to get the values in nodes in my _javascript_ variable.

 

How to do that??

 

Thanks in advance

>From: "Reynolds, Ron" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: RE: Urgent
>Date: Fri, 31 Aug 2001 08:33:13 -0700
>
>i just had to write this method to extract the text within a DOM Node. it
>might help:
> private static String _getValue(Node node) {
> StringBuffer buf = new StringBuffer(30);
> NodeList kids = node.getChildNodes();
> int numKids = kids.getLength();
> for (int x = 0; x < numKids; ++x) {
> Node kid = kids.item(x);
> short kidType = kid.getNodeType();
> if (kidType == Node.TEXT_NODE) {
> buf.append(kid.getNodeValue());
> }
> }
> return buf.toString();
> }
>note - this doesn't return text within child-nodes of the current node, so
>something like "abcdefghi" would return "abcghi". it's an
>easy (recursive) fix to get that text, tho.
>
>my question is - is there something like this built into DOM? if not, why
>not? it seems like such a common operation to do on a DOM tree...
>...................ron.
> -----Original Message-----
>From: Soft Engg [mailto:[EMAIL PROTECTED]
>Sent: Friday, August 31, 2001 8:08 AM
>To: [EMAIL PROTECTED]
>Subject: Urgent
>
>
>
>Hi All
>
>
>
>Iam using
>
>myXML.documentElement.transformNode(myXSL.documentElement);
>now i want to get a value of a node test say test in a _javascript_
>variable.
>
>
>
>How to do it.
>
>
>
>Thanks in advance
>
>
> >From: "Aleksandr Shneyderman"
> >Reply-To: [EMAIL PROTECTED]
> >To:
> >Subject: DTD Parser
> >Date: Fri, 31 Aug 2001 10:45:38 -0400
> >
> >Hello, all!
> >
> >I am not usre if this makes much sence to anyone, but
> >I was wondering if there is any DTD Parser out there?
> >
> >What I mean is that I have a dtd file and I need to
> >get its representation as a java object tree. So I can
> >easily answer questions like what kind of attributes
> >might my element have and what would be the default values
> >for them. What kind of elements a given element might be
> >consistent of? I want to do it programmatically not
> >by just reading my DTD or trying to parse my XML and see
> >if it is valid or not. In other words I want to write
> >a tool that will help me construct my XML file based on
> >my DTD in a way that my XML will be always valid.
> >
> >Is there any parser/metadata generator out there that
> >I might use for this?
> >
> >Thanks,
> >Alex.
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _____
>
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>--------------------------------------------------------------------- To
>unsubscribe, e-mail: [EMAIL PROTECTED] For additional
>commands, e-mail: [EMAIL PROTECTED]
>


Get your FREE download of MSN Explorer at http://explorer.msn.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to