मैं एक एक्सएमएल फ़ाइल को पार्स करने की कोशिश कर रहा हूं जिसमें कुछ विशेष वर्ण हैं जैसे "" डीओएम पार्सर का उपयोग करते हुए। मुझे saxparse अपवाद मिल रहा है "इकाई का संदर्भ एक delimiter के साथ समाप्त होना चाहिए"। क्या इस अपवाद को दूर करने का कोई तरीका है, क्योंकि मैं विशेष वर्णों को हटाने के लिए XML फ़ाइल को संशोधित नहीं कर सकता, क्योंकि यह विभिन्न एप्लिकेशन से आ रहा है। रूट तत्व प्राप्त करने के लिए कृपया इस एक्सएमएल फ़ाइल को पार्स करने का एक तरीका सुझाएं?org.xml.sax.SAXParseException: इकाई "टी" का संदर्भ ';' के साथ समाप्त होना चाहिए delimiter
अग्रिम
यह XML के हिस्से में धन्यवाद जो मैं
<P>EDTA/THAM WASH
</P>
<P>jhc^72. METER SOLVENT: Meter 21 LITERS of R. O. WATER through the add line into
FT-250. Start agitator.
</P>
<P>R. O. WATER <ZLl LITERS </P>
<P>• NOTE: The following is a tool control operation. The area within 10 feet of any open vessel or container is under tool control. </P>
<P>-af . 73. CHARGE SOLIDS: Remove any unnecessary items from the tool controlled area. Indicate the numbers of each item that will remain in the tool controlled area during the operation in the IN box of the Tool Control Log. </P>
<P>^___y_ a. To minimize the potential for cross contamination, confirm that no other solids are being charged or packaged in adjacent equipment. </P>
<P>kk k WARNING: Wear protective gloves, air jacket and use local exhaust when handling TROMETHAMINE USP (189400) (THAM) (K-l--Irritant!). The THAM may be dusty. </P>
<P>-<&^b . Charge 2.1 KG of TROMETHAMINE USP (189400) (THAM) into FT-250 through the top. </P>
<P>TROMETHAMINE USP (189400) (THAM) </P>
<P>Scale ID: // 7S </P>
<P>LotNo.: qy/o^yo^ </P>
<P>Gross: ^. S </P>
<P>Tare: 10 ,1 </P>
<P>Net: J^l </P>
<P>Total: JL'J </P>
<P><Figure ActualText="&T ">
<ImageData src="images/17PT 07009K_img_1.jpg"/>
&T </Figure>
Checked by </P>
बस एक छोटी टिप्पणी। यह निश्चित रूप से अमान्य है जो स्कीमा है, लेकिन पहले यह अच्छी तरह से गठित नहीं है। हम यहां स्कीमा के बारे में बात नहीं कर रहे हैं। – lkuty
स्ट्रिंग xml = " आआ और बीबीबी और सीसीसी client_name>"; परिणाम आए & बीबीबी और सीसीसी client_name>। क्या इसे एक से अधिक और इनपुट स्ट्रिंग में काम करने के लिए बनाया जा सकता है? –
हाँ। "&([^; और] + (?! (?: \\ w |;)))" (जोड़ा गया और pos 6 पर) - यह एकाधिक और इनपुट में काम करना चाहिए। – robbi5