Hi,
 
I have couple of questions regarding Xerces and Xalan
 
First one is why do we have to use these lines , whats the importance of usign it ? Is this compulsory
 
    XALAN_USING_XALAN(XalanDocument)
    XALAN_USING_XALAN(XPathEvaluator)
    XALAN_USING_XERCES(XMLPlatformUtils)
    XALAN_USING_XERCES(MemBufInputSource)
    XALAN_USING_XALAN(XalanDOMString)
    XALAN_USING_XALAN(XalanNode)
    XALAN_USING_XALAN(XalanSourceTreeInit)
    XALAN_USING_XALAN(XalanSourceTreeDOMSupport)
    XALAN_USING_XALAN(XalanSourceTreeParserLiaison)
    XALAN_USING_XALAN(XObjectPtr)
    XALAN_USING_XALAN(NodeRefList)
    XALAN_USING_XERCES(LocalFileInputSource)
 
Second One ,
 
We are tryign to write a program to perform following things
1. We want to get the value of each tag , modify an XML tag if necessary , delete an XML tag and store it back to the same XML file.
2. I need to do an XML transformation.
3. I need to do an XML validation.
4. I need to find the difference between two XML files. It could in ordered or unordered.
 
1. In the second case what and all need to be initialised ?
 
2. Are there any API's to find the difference between two XML files or do I have to perform these things on my own.
 
3. Should I use DOM or SAX ?
 
4. I heard both Xalan DOM and Xerces DOM is present , Which one should I use ?
 
5. How to use only Xerces DOM or only Xalan DOM ?
 
6. Is Memory Manager necessary ? if yes please provide me the sample code on how to use it ?
 
 
help me to answer these..
 
Thanks for the support
-Praveen
 
 
 
 


From: Amit Dang [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 19, 2005 10:49 AM
To: [email protected]
Subject: Re: How to get an Xpath?

Hi Praveen,
    You need to provide the XML data/stream, it can be via XML File or in memory. A sample has been provided with Xalan for XML data via file and for XML data stored in a memory you can use 'MemBufInputSource'. I am enclosing a .cxx and .hxx file while might be of some help to you.
Hope this helps.
 
Cheers,
Amit Dang
----- Original Message -----
Sent: Tuesday, April 19, 2005 10:38 AM
Subject: How to get an Xpath?

I have compiled the Xalan 1.9  C++  in Sol 2.8.
Samples are aslo compiled and I am able to run the EXE's.
 
Imagine I have an XML file as follows
 
<PML>
    <EC>
            <TN>100-111-99<!-- UPDATE FROM "100-112-0039" --></TN>
            <LVL1><!-- DELETE LVL1 -->
                <AS>aaa</AS>
            </LVL1>
            <LV1>
                <NU>AB/10<!-- UPDATE FROM "AB/11" --></NU>
            </LV1>
            <LV1><!-- DELETE LV1 -->
                <EMP>101</EMP>
                <DT>10012005</DT>
            </LV1>
    </EC>
</PML>
 
If I give an input as "UPDATE FROM" the output I should get is "PML:EC.TN" and  "PML:EC.LV1"
Similarly if I give an input as "DELETE" I should get the output as "PML:EC.LVL1" and "PML:EC.LV1[2]"
 
Is there a way to get this from the Xalan API's ?
If you have any sample program please do send me...
 
I checked the sample program present in Xalan , it takes three parameters "XML file" , "Context" and "XPATH" .
 
I am not able to understand what should go as input in case of  "context " and "XPATH".
 
 
Thanks
-Praveen


Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.


Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.

Reply via email to