Click here to Skip to main content
15,918,007 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionExtra pair of eyes Pin
mango_lier15-Oct-07 12:59
mango_lier15-Oct-07 12:59 
AnswerRe: Extra pair of eyes Pin
Stefan Troschuetz15-Oct-07 21:46
Stefan Troschuetz15-Oct-07 21:46 
GeneralRe: Extra pair of eyes Pin
mango_lier16-Oct-07 6:26
mango_lier16-Oct-07 6:26 
QuestionBuilding a transform to re-structure a XML file Pin
I_AM_A_TULLI15-Oct-07 7:41
I_AM_A_TULLI15-Oct-07 7:41 
QuestionHelp: how to get link addres in the RSS XML file in MFC/C++? Pin
fujoey13-Oct-07 15:42
fujoey13-Oct-07 15:42 
QuestionXML Problem Pin
kkb_200112-Oct-07 2:12
kkb_200112-Oct-07 2:12 
AnswerRe: XML Problem Pin
led mike12-Oct-07 5:06
led mike12-Oct-07 5:06 
QuestionJava XMLFilter XMLWriter problem -- returning extra tags from an XMLFilter using XMLWriter Pin
bessels10-Oct-07 23:43
bessels10-Oct-07 23:43 
I've a problem for which I can't seem to find an elegant/efficient solution. Maybe someone would have an answer/hint. Did RTFM, googled, read 2 Java/Sax books.....

We have a servlet which is accepting a SOAP request. This is fed to a SAX2 XMLFilter (called SoapXMLFilter) and the result of this using an XMLWriter is put as the string 'payload' in a Result object. Later a new SOAP request is generated, part of the body of this SOAP msg is the payload string. This is given to a MessageQueue. So far so good.

In the new setup the header of the SOAP message contains a <security> block. The body contains amongst other things a <logistic> block. In the past SoapXMlfilter returned only the logistic> block (using super.startelement super.endelement etc.... In the new situation I have to return the following <logistic> <security> . Eg the security block is now INSIDE the logistic block.

When at the endelement tag for logistic I would like to insert the security block. Using a XMLWriter inside SoapXMLfilter I can put the security block into a string. At the endelement for Logistic I have this available. I somehow must have this block returned from SoapXMLFilter.

Things I can come up with:
---------------------------
1) Put security block as string security in a Object Body (using XMLwriter inside SOAPXMLWriter, this already works) . Put things between the <logistic> and tags as string logistic (using another XMLWriterr) in Object body. When generating end SOAP request. Create Stringbuffer, append "<logistic>", append logistic string, append security string, append "". Hence I know have a security block inside the logistic block. I find this UGLY and this should be done in SOAPXMLFilter.

2) The super.startelement(, , ,) super.endelement(, , ) are put in a String array. At endelement of Logistic I somehow have to execute them. Don't know if this is even possible......

3) Maybe an an additional XMLFilter inside SOAPXMLfilter which has as input has the security string. Maybe you can pass as a parameter the original XMLreader handler so that somehow a <orginal xmlreader="">.startelement inside this additional XNLFilter will have the effect of a super.startelement in SOAPXMLfilter. Eg SOAPXMLfilter returns the security block inside the logistic block. No idea if this possible at all..........

4) Easy, elegant, fast. I've missed it....... At this point I'm basically given up.

SoapXMLfilter is in fact a very complex beast which does many many things. Rewriting this is not an option (if it works don't...) . The website is a higtraffic one which means a solution has to be efficient (speed and memory footprint wise). This all means I need a solution using SAX2 (DOM or something like is not really an option I think).

Any hints/pointers are HIGHLY appreciated.
QuestionElement does not exist in namespace... Pin
Lutosław10-Oct-07 21:42
Lutosław10-Oct-07 21:42 
AnswerRe: Element does not exist in namespace... Pin
Stefan Troschuetz15-Oct-07 22:04
Stefan Troschuetz15-Oct-07 22:04 
GeneralRe: Element does not exist in namespace... Pin
Lutosław17-Oct-07 21:00
Lutosław17-Oct-07 21:00 
QuestionEncrypting and decrypting xml files Pin
steve_rm10-Oct-07 19:33
steve_rm10-Oct-07 19:33 
AnswerRe: Encrypting and decrypting xml files Pin
Scott Dorman11-Oct-07 4:48
professionalScott Dorman11-Oct-07 4:48 
Questionserialize colors and fonts in XML Pin
urbane.tiger9-Oct-07 21:09
urbane.tiger9-Oct-07 21:09 
AnswerRe: serialize colors and fonts in XML Pin
led mike10-Oct-07 4:36
led mike10-Oct-07 4:36 
GeneralRe: serialize colors and fonts in XML Pin
urbane.tiger10-Oct-07 23:39
urbane.tiger10-Oct-07 23:39 
GeneralRe: serialize colors and fonts in XML Pin
led mike11-Oct-07 5:41
led mike11-Oct-07 5:41 
GeneralRe: serialize colors and fonts in XML Pin
urbane.tiger11-Oct-07 18:28
urbane.tiger11-Oct-07 18:28 
GeneralRe: serialize colors and fonts in XML Pin
led mike12-Oct-07 4:10
led mike12-Oct-07 4:10 
GeneralRe: serialize colors and fonts in XML Pin
urbane.tiger14-Oct-07 19:30
urbane.tiger14-Oct-07 19:30 
QuestionRegarding xpath expressions Pin
anu818-Oct-07 23:48
anu818-Oct-07 23:48 
AnswerRe: Regarding xpath expressions Pin
anu819-Oct-07 0:31
anu819-Oct-07 0:31 
QuestionWord XML/XSLT Pin
Glenn E. Lanier II8-Oct-07 12:44
Glenn E. Lanier II8-Oct-07 12:44 
QuestionFormula to calculate Equal Monthly Payments Pin
Vtoria8-Oct-07 7:35
Vtoria8-Oct-07 7:35 
AnswerRe: Formula to calculate Equal Monthly Payments Pin
Howard Richards22-Oct-07 5:16
Howard Richards22-Oct-07 5:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.