Post Reply 
XML file not being filtered?
Nov. 05, 2009, 06:48 PM (This post was last modified: Nov. 05, 2009 06:52 PM by ErickPetru.)
Post: #1
Question XML file not being filtered?
Hi people!

I'm new here and new with Proxo, but already very interested with all the possibilities... Pray

Then I was writing my first simple filter, to replace something in a XML file.

Here is the filter:
Code:
XML Replacing
In = FALSE
Out = FALSE
Match = <COST>123.00</COST>
Replace = <COST>5000.00</COST>

And here is the example file I'm using: http://www.comptechdoc.org/independent/w.../parts.xml

But when I load this URL in my IE, nothing is replaced. The Proxo test window replace nicely, but nothing happens on the browser.

The proxy is correctly configurated in IE (Proxo's default filters are working).

What I'm doing wrong?

Thanks in advance!
Erick.
Add Thank You Quote this message in a reply
Nov. 05, 2009, 09:32 PM
Post: #2
RE: XML file not being filtered?
your Proxo config has to "tell" Proxo to filter xml, without being "told to", Proxo lets all xml fly by untouched...

Code:
In = TRUE
Out = FALSE
Key = "Content-Type: 6d Filter XML {JJoe} (In) [add]"
Match = "(text/xml)\1$FILTER(true)"
Replace = "\1"
Add Thank You Quote this message in a reply
Nov. 06, 2009, 04:59 AM
Post: #3
RE: XML file not being filtered?
Comptechdoc.org sends me

Code:
Content-Type: application/xml

So the Header filter needs to be modified
and a Web page filter is needed.

Code:
[HTTP headers]
In = TRUE
Out = FALSE
Key = "Content-Type: 6d Filter XML {JJoe} (In) [add]"
Match = "((text|application)/xml)\1$FILTER(true)"
Replace = "\1"

[Patterns]
Name = "Test"
Active = TRUE
URL = "www.comptechdoc.org/independent/web/xml/guide/parts.xml"
Limit = 256
Match = "<COST>123.00</COST>"
Replace = "<COST>5000</COST>"

More at
http://prxbx.com/forums/showthread.php?tid=1216

BTW, I think we can enable filtering without completing a match.

Code:
[HTTP headers]
In = TRUE
Out = FALSE
Key = "Content-Type: Filter XML (In)"
Match = "[^/]+/xml$FILTER(true)(^)"

(^) never matches

Have fun
Add Thank You Quote this message in a reply
Nov. 06, 2009, 05:57 AM (This post was last modified: Nov. 06, 2009 05:58 AM by Siamesecat.)
Post: #4
RE: XML file not being filtered?
I should think this would work, not only for XML but also for XSL and XHTML.
Code:
In = TRUE
Out = FALSE
Key = "Content-Type: Filter .xml/.xsl/.xhtml (in)"
URL = "*.(x(htm|m|s)l)"
Match = "\0"
Replace = "\0$FILTER(True)"
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: