Question: 1.) I have an XSD file (I have no control over) that I converted to object model using JAXB

2.) I have a database extract in XML format. The XML element tag names are strictly the field names of the table

3.) I mapped the xml elements to the Java class using annotations.

Question: Is there a way to maintain the element names in the XSD file, and JUST extract the value of the xml elements.

JAXB annotated class:

```
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Item", propOrder = {
    "code",
    "name",
    "price"
})
@XmlRootElement(name="inventory")
public class Item {

    @XmlElement(name="catalog_num", required = true)
    protected String code;

    @XmlElement(name="catalog_descrip", required = true)
    protected String name;

    @XmlElement(name="prod_price")
    protected double price;

    public String getCode() {
        return code;
    }
//etc

```

An excerpt of the database xml file:

```
<?xml version="1.0"?>
<inventory>
          <catalog_num>I001</catalog_num>
          <catalog_descrip>Descriptive Name of Product</catalog_descrip>
          <prod_price>11200</prod_price>
</inventory>

```

The result I need to get after marshaling the above xml file is:

```
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Item>
    <code>I001</code>
    <name>Descriptive Name of Product</name>
    <price>11200.0</price>
</Item>

```

In the above code, I have tried annotating the methods instead of the fields, but I yield the same result. I just want the value extracted from the xml elements, but not change the element names.

I hope I am making sense.

Answer: 
Do it at the web server level. Since you tagged your question `.htaccess` I'm assuming that's Apache.

```
RewriteEngine On
RewriteCond %{QUERY_STRING} file=(.*)&name=(.*)&sid=(.*)
RewriteRule modules.php modules.php?name=%2&file=%1&sid=%3 [R=301,L]

```

I haven't tested that, does it work?
You could try something like this -

```
<?php

if (preg_match ('/file=article\&name=Name/', $_SERVER['REQUEST_URI'])) {
    header ('HTTP/1.1 301 Moved Permanently');
    header ('Location: ' . str_replace('file=article&name=Name', 'name=Name&file=article', $_SERVER['REQUEST_URI']);
}

```

or for a more generic one

```
<?php

if (preg_match ('/file=(.*)\&name=(.*)/', $_SERVER['REQUEST_URI'], $matches)) {
    header ('HTTP/1.1 301 Moved Permanently');
    header ('Location: ' . preg_replace('/file=(.*)&name=([^&]*)/', 'file=${1}\&name=${2}', $_SERVER['REQUEST_URI']));
}

```