User Profile

Collapse

Profile Sidebar

Collapse
luthriaajay
luthriaajay
Last Activity: Jun 21 '07, 08:33 AM
Joined: Apr 10 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • luthriaajay
    started a topic Using xsl:value-of.
    in XML

    Using xsl:value-of.

    Using <xsl:value-of in XSL


    Code:
    XML file
    
    <i:Details>
      <i:Stra>
           <stra:Desc>ABC</stra.Desc>
      </i:Stra>
    </i:Details>

    If i use XSL value of

    Code:
    <xsl:value-of select="i:Details/i:Stra/stra:Desc)"/>
    ERROR:Namespace prefix 'stra' is undeclared.'...
    See more | Go to post

  • luthriaajay
    started a topic XML appending
    in XML

    XML appending

    I have a tricky question here.

    1).I have an XML that is generated on the fly.

    Code:
    XML Generated
    -------------
    
    Document genereatedDoc =
    
    <Trade>
        <Level>10 </Level>
        <Sty> .5 </Sty>
    </Trade>
    2).I have to add the above XML generated in between another XML document

    [code]...
    See more | Go to post

  • luthriaajay
    started a topic using getElementsByTagName() Query.
    in XML

    using getElementsByTagName() Query.

    I am trying to go to a subchild node of an XML document.

    by saying

    Document.getEle mentsByTagName( "Details/Market");

    but its not allowing me to use sub child nodes.

    It works all right if I specify just 'Details'

    How can i use a sub child nodes getElementsByTa gName?

    Is it poss?
    See more | Go to post

  • luthriaajay
    started a topic Creating XML in Java with a namespace.
    in XML

    Creating XML in Java with a namespace.

    I am creating an XML String with the

    Code:
    private String sTradeSizeXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
    	"<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">" + "  " +
    	"xmlns:i=\"http://www.abc.com/common/interests:i\">" +
        "<Note>"
    ...
    See more | Go to post

  • luthriaajay
    replied to Using XPATH to extract element value.
    in XML
    I have solved the above query.
    Thanks,
    See more | Go to post

    Leave a comment:


  • luthriaajay
    replied to Using XPATH to extract element value.
    in XML
    I have also tried using Namespace,but no luck.
    Help appreciated.

    Code:
    private void extractValue(Document configNode) 
        {
    		System.out.println("In extract value");
    		XPathFactory factory = XPathFactory.newInstance();
    	    XPath xpath = factory.newXPath();
    	    NamespaceContext namespace = new NamespaceContextImpl("i:", "http://www.tfs.com/common/interests");
    ...
    See more | Go to post

    Leave a comment:


  • luthriaajay
    started a topic Using XPATH to extract element value.
    in XML

    Using XPATH to extract element value.

    I need some help to extract the LatestFillQuant ity element value using XPATH.
    in Java.
    I am unable to extract the value of 10000.
    Please help as to what have I done wrong.?
    Help appreciated.
    Code:
    The 'Document' configNode contains the flwg:
    
    <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
    <i:Interest >
    	<i:Generation>3</i:Generation>
    ...
    See more | Go to post

  • luthriaajay
    replied to How can I define a table in xsl?
    in XML
    output as text.

    The table should let users enter quantity and price.
    See more | Go to post

    Leave a comment:


  • luthriaajay
    started a topic How can I define a table in xsl?
    in XML

    How can I define a table in xsl?

    Is it possible to define a table in XSL?

    I want a table with this format

    Code:
    Quantity : <Quantity Value will be entered>
    Price     :  <Price will be entered >
    So I need to define a table with 2 rows and 2 cols?

    Is this possible in xsl versiobn 1.0?
    See more | Go to post

  • luthriaajay
    replied to Using XPath question.Plase guide.
    in XML
    The above has been done
    See more | Go to post

    Leave a comment:


  • luthriaajay
    started a topic Using XPath question.Plase guide.
    in XML

    Using XPath question.Plase guide.

    I intend using XPATH to browsw thru an XML document in Java.
    This XML document is of type Document.

    First Question:

    How do I use the Document Builder to open an XML document?

    Code:
    Document xmlMessage;
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
        domFactory.setNamespaceAware(true); // never forget this!
        DocumentBuilder builder = domFactory.newDocumentBuilder();
    ...
    See more | Go to post

  • luthriaajay
    started a topic Adding an attribute to an element in an XSD
    in XML

    Adding an attribute to an element in an XSD

    I need to add an attribute to an element in an XSD
    so that the output of my XML is:

    Code:
    <Ext>
    <Order>
      <Status>New</Status>
    </Order>
    [/Ext>
    I have modified my XSD to include the element Order:

    Code:
    <xs:element name="Order" type="xs:string" nillable="true">
    	<xs:annotation>
    ...
    See more | Go to post

  • luthriaajay
    replied to XPath showing NULL value.Please help.
    in XML
    Product : A and (not EQ.D) my mistake
    See more | Go to post

    Leave a comment:


  • luthriaajay
    replied to XPath showing NULL value.Please help.
    in XML
    The confignode is correctly set as when I say:

    Code:
    String szproduct = xpath.evaluate("AQListener/Product/text()", confignode);
    System.out.println("szproduct  " + szproduct);
    
    Output: EQ.D
    See more | Go to post

    Leave a comment:


  • luthriaajay
    started a topic XPath showing NULL value.Please help.
    in XML

    XPath showing NULL value.Please help.

    Why is my xpath giving null for the the flwg

    Code:
    <Configuration>
    <Listener.Whiteboard>
    		<AQListener>
    			<Product>A</Product>
    			<Message.Class>XMLMessage</Message.Class>
    			<Database>
    			    <URL></URL>
    			</Database>
    		</AQListener>
    </Listener.Whiteboard>
    </Configuration>
    ...
    See more | Go to post

  • luthriaajay
    started a topic XSI:TYPE as an attribute.
    in XML

    XSI:TYPE as an attribute.

    I am creating an element called 'i:Details'
    which has an attribute called xsi:type

    Code:
    <xsl:element name="i:Details">
    <xsl:attribute name="xsi.type">
    	xsl:text>i:vanilla.stock</xsl:text>
    </xsl:attribute>
    Its not allowing me to use 'xsi:type'
    but when I say xsi.type,it works.

    I need to replace the . with a : ...
    See more | Go to post

  • luthriaajay
    replied to XPATH Query to extract attribute value
    in XML
    Hi Doran,
    Still shows 0.
    May be we are missing something

    I guess,we dont need to specify FIXML .

    Code:
    //Order/Insrmt
    See more | Go to post

    Leave a comment:


  • luthriaajay
    replied to XPATH Query to extract attribute value
    in XML
    Code:
    NodeList nodes = (NodeList) result;
    returns 0.

    and so its not going in the for loop.
    See more | Go to post

    Leave a comment:


  • luthriaajay
    started a topic XPATH Query to extract attribute value
    in XML

    XPATH Query to extract attribute value

    Hi,

    I need to use XPATH to extract the value of attribute ID in element Instrmt


    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <FIXML xmlns="http://www.fixprotocol.org/FIXML-4-4">
    	<Order Acct="MAC" Ccy="USD" ComplianceID="C" >
    		<Hdr SeqNum="2" Snt="2007-04-23T08:22:53" />
    		<PreAll
    ...
    See more | Go to post

  • Hi Doran, I have been able to run this now
    Thanks for all your help.
    Its running fine.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...