1

I've been looking for similar issue but did not find.

I have an XML file that looks like this :

<Deed DeedStatus="N" 
CompanyName="Test Value"
xmlns="schemas/deedv2"> 

and the deedv2 XSD :

<xs:simpleType name="DeedStatusType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="N">
                <xs:annotation>
                    <xs:documentation>
                        Testingg
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
        </xs:restriction>
    </xs:simpleType>

I'm trying to use convert the "N" value to appear as "Testing" in another XML. Is there a way I can do this without writing code? Thank you in advance.

1 Answer 1

0

No, XML and XSD cannot generate another XML file.

XSLT is the XML standard for transforming XML and would be ideal for generating an XML file based upon an input XML file and the contents of xs:annotation/xs:documentation in an XSD.

For an example of opening in XSLT two XML files (your XML plus your XSD, which is itself XML), see @michael.hor257k's answer to this question: How to merge two xml files using xslt generating text output.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.