开发者

Parse XML Scheme file and retrieve values in Android

开发者 https://www.devze.com 2023-02-20 12:30 出处:网络
I have an XML Scheme file like the following. <?xml version=\"1.0\" encoding=\"UTF-8\"?> <xs:schema

I have an XML Scheme file like the following.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns="urn:myNS" 
    targetNamespace="urn:myNS" 
    attributeFormDefault="unqualified" 
    elementFormDefault="qualified">
    <xs:element name="some_name">
        <xs:complexType>
             <xs:all>
             ...

I need to get the values of targetNamespace and element name i开发者_StackOverflow社区nto Strings (in Android).

Is there a parser to do it? Can anybody suggest a way to do it?

Coding examples would be appreciated.


Android support some XML parsers used in Java i.e. SAX Parser, DOM Parser and PULL Parser etc. You can use any of them. This link may help you.

0

精彩评论

暂无评论...
验证码 换一张
取 消